[PATCH] Add tests for supported interfaces

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Tue Nov 11 23:08:17 CST 2008


---
 dlls/mshtml/script.c       |    3 +++
 dlls/mshtml/tests/script.c |   10 ++++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/dlls/mshtml/script.c b/dlls/mshtml/script.c
index 37068ad..90bfef9 100644
--- a/dlls/mshtml/script.c
+++ b/dlls/mshtml/script.c
@@ -223,6 +223,9 @@ static HRESULT WINAPI ActiveScriptSite_QueryInterface(IActiveScriptSite *iface,
     }else if(IsEqualGUID(&IID_IActiveScriptSiteDebug32, riid)) {
         TRACE("(%p)->(IID_IActiveScriptSiteDebug32 %p)\n", This, ppv);
         *ppv = ACTSCPDBG32(This);
+    }else if(IsEqualGUID(&IID_ICanHandleException, riid)) {
+        TRACE("(%p)->(IID_ICanHandleException not supported %p)\n", This, ppv);
+        return E_NOINTERFACE;
     }else {
         FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
         return E_NOINTERFACE;
diff --git a/dlls/mshtml/tests/script.c b/dlls/mshtml/tests/script.c
index 90e5583..32f0974 100644
--- a/dlls/mshtml/tests/script.c
+++ b/dlls/mshtml/tests/script.c
@@ -767,6 +767,8 @@ static HRESULT WINAPI ActiveScript_SetScriptSite(IActiveScript *iface, IActiveSc
 {
     IActiveScriptSiteInterruptPoll *poll;
     IActiveScriptSiteDebug *debug;
+    IServiceProvider *service;
+    ICanHandleException *canexpection;
     LCID lcid;
     HRESULT hres;
 
@@ -790,6 +792,14 @@ static HRESULT WINAPI ActiveScript_SetScriptSite(IActiveScript *iface, IActiveSc
     if(SUCCEEDED(hres))
         IActiveScriptSiteDebug32_Release(debug);
 
+    hres = IActiveScriptSite_QueryInterface(pass, &IID_ICanHandleException, (void**)&canexpection);
+    ok(hres == E_NOINTERFACE, "Could not get IID_ICanHandleException interface: %08x\n", hres);
+
+    hres = IActiveScriptSite_QueryInterface(pass, &IID_IServiceProvider, (void**)&service);
+    todo_wine ok(hres == S_OK, "Could not get IServiceProvider interface: %08x\n", hres);
+    if(SUCCEEDED(hres))
+        IServiceProvider_Release(service);
+
     site = pass;
     IActiveScriptSite_AddRef(site);
     return S_OK;
-- 
1.5.4.3


--------------020206090103070206010704--



More information about the wine-patches mailing list