1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

mshtml: Forward SID_SInternetHostSecurityManager of the document obj to the doc node.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
Gabriel Ivăncescu 2024-01-29 16:59:39 +02:00 committed by Alexandre Julliard
parent 24c3ce6f81
commit 370a339055
2 changed files with 22 additions and 0 deletions

View file

@ -425,6 +425,11 @@ static HRESULT WINAPI DocObjServiceProvider_QueryService(IServiceProvider *iface
return IOleUndoManager_QueryInterface(This->undomgr, riid, ppv);
}
if(IsEqualGUID(&SID_SInternetHostSecurityManager, guidService)) {
TRACE("SID_SInternetHostSecurityManager\n");
return IInternetHostSecurityManager_QueryInterface(&This->doc_node->IInternetHostSecurityManager_iface, riid, ppv);
}
if(IsEqualGUID(&SID_SContainerDispatch, guidService)) {
TRACE("SID_SContainerDispatch\n");
return IHTMLDocument2_QueryInterface(&This->IHTMLDocument2_iface, riid, ppv);

View file

@ -4541,7 +4541,9 @@ static void test_exec_script(IHTMLDocument2 *doc, const WCHAR *codew, const WCHA
static void test_simple_script(void)
{
IInternetHostSecurityManager *sec_mgr, *sec_mgr2;
IHTMLDocument2 *doc_node;
IServiceProvider *sp;
IHTMLWindow2 *window;
IHTMLDocument2 *doc;
HRESULT hres;
@ -4621,6 +4623,21 @@ static void test_simple_script(void)
hres = IHTMLWindow2_get_document(window, &doc_node);
ok(hres == S_OK, "get_document failed: %08lx\n", hres);
hres = IHTMLDocument2_QueryInterface(doc, &IID_IServiceProvider, (void**)&sp);
ok(hres == S_OK, "Could not get IServiceProvider iface: %08lx\n", hres);
hres = IServiceProvider_QueryService(sp, &SID_SInternetHostSecurityManager, &IID_IInternetHostSecurityManager, (void**)&sec_mgr);
ok(hres == S_OK, "QueryService failed: %08lx\n", hres);
IServiceProvider_Release(sp);
hres = IHTMLDocument2_QueryInterface(doc_node, &IID_IServiceProvider, (void**)&sp);
ok(hres == S_OK, "Could not get IServiceProvider iface: %08lx\n", hres);
hres = IServiceProvider_QueryService(sp, &SID_SInternetHostSecurityManager, &IID_IInternetHostSecurityManager, (void**)&sec_mgr2);
ok(hres == S_OK, "QueryService failed: %08lx\n", hres);
ok(iface_cmp(sec_mgr, sec_mgr2), "sec_mgr != sec_mgr2\n");
IInternetHostSecurityManager_Release(sec_mgr2);
IInternetHostSecurityManager_Release(sec_mgr);
IServiceProvider_Release(sp);
SET_EXPECT(SetScriptState_DISCONNECTED);
SET_EXPECT(Close);
SET_EXPECT(Close2);