Commit b6dff3f7 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Return HTMLDocumentNode object in ScriptHost::QueryService for…

mshtml: Return HTMLDocumentNode object in ScriptHost::QueryService for SID_SInternetHostSecurityManager.
parent bfb45783
......@@ -557,6 +557,16 @@ static HRESULT WINAPI ASServiceProvider_QueryService(IServiceProvider *iface, RE
REFIID riid, void **ppv)
{
ScriptHost *This = SERVPROV_THIS(iface);
if(IsEqualGUID(&SID_SInternetHostSecurityManager, guidService)) {
TRACE("(%p)->(SID_SInternetHostSecurityManager)\n", This);
if(!This->window || !This->window->doc)
return E_NOINTERFACE;
return IInternetHostSecurityManager_QueryInterface(HOSTSECMGR(This->window->doc), riid, ppv);
}
FIXME("(%p)->(%s %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv);
return E_NOINTERFACE;
}
......
......@@ -571,6 +571,23 @@ static const IObjectSafetyVtbl ObjectSafetyVtbl = {
static IObjectSafety ObjectSafety = { &ObjectSafetyVtbl };
static void test_security(void)
{
IInternetHostSecurityManager *sec_mgr;
IServiceProvider *sp;
HRESULT hres;
hres = IActiveScriptSite_QueryInterface(site, &IID_IServiceProvider, (void**)&sp);
ok(hres == S_OK, "Could not get IServiceProvider iface: %08x\n", hres);
hres = IServiceProvider_QueryService(sp, &SID_SInternetHostSecurityManager,
&IID_IInternetHostSecurityManager, (void**)&sec_mgr);
IServiceProvider_Release(sp);
ok(hres == S_OK, "QueryService failed: %08x\n", hres);
IInternetHostSecurityManager_Release(sec_mgr);
}
static HRESULT WINAPI ActiveScriptProperty_QueryInterface(IActiveScriptProperty *iface, REFIID riid, void **ppv)
{
*ppv = NULL;
......@@ -960,6 +977,8 @@ static HRESULT WINAPI ActiveScriptParse_ParseScriptText(IActiveScriptParse *ifac
CHECK_CALLED(GetScriptDispatch);
CHECK_CALLED(script_testprop_i);
test_security();
return S_OK;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment