Jacek Caban (@jacek) commented about dlls/mshtml/tests/events.c:
ok(hres == S_OK, "get_documentMode failed: %08lx\n", hres);
ok(V_VT(&var) == VT_R4, "V_VT(documentMode) = %u\n", V_VT(&var));
document_mode = V_R4(&var);
}
IHTMLDocument6_Release(doc6);
- }
- hres = IHTMLWindow2_QueryInterface(window, &IID_IHTMLWindow6, (void**)&window6);
- ok(hres == S_OK, "Could not get IHTMLWindow6: %08lx\n", hres);
- IHTMLWindow2_Release(window);
- window = NULL;
- hres = IHTMLWindow6_get_sessionStorage(window6, &tmp_session_storage);
- ok(hres == S_OK, "get_sessionStorage failed: %08lx\n", hres);
- ok(tmp_session_storage != NULL, "session_storage == NULL\n");
- ok(tmp_session_storage != session_storage[0], "session_storage after navigation same as old session_storage\n");
This should really use `!iface_cmp()` to make sure it's not one more instance of wrappers that native uses in similar places. However, trying to do that crashes on native, which is just one more reason to believe that detached documents are broken there and trying too hard to mimic it does not make sense. I think that you're misinterpreting some quirks that are not really interested in the first place. I suggest to drop those tests and just do the right thing: don't send any events on detached document, maybe even fail early on an attempt to use such storage.