Jacek Caban : mshtml: Added better IHTMLWindow2::get_opener stub.

Alexandre Julliard julliard at winehq.org
Tue Apr 10 13:52:34 CDT 2012


Module: wine
Branch: master
Commit: 8e71096fd1ec7a5909a791770a67ac092de6d4e0
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8e71096fd1ec7a5909a791770a67ac092de6d4e0

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Tue Apr 10 12:53:03 2012 +0200

mshtml: Added better IHTMLWindow2::get_opener stub.

---

 dlls/mshtml/htmlwindow.c |    7 +++++--
 dlls/mshtml/tests/dom.c  |    6 ++++++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c
index 294f551..4242a77 100644
--- a/dlls/mshtml/htmlwindow.c
+++ b/dlls/mshtml/htmlwindow.c
@@ -711,8 +711,11 @@ static HRESULT WINAPI HTMLWindow2_put_opener(IHTMLWindow2 *iface, VARIANT v)
 static HRESULT WINAPI HTMLWindow2_get_opener(IHTMLWindow2 *iface, VARIANT *p)
 {
     HTMLWindow *This = impl_from_IHTMLWindow2(iface);
-    FIXME("(%p)->(%p)\n", This, p);
-    return E_NOTIMPL;
+
+    FIXME("(%p)->(%p) returning empty\n", This, p);
+
+    V_VT(p) = VT_EMPTY;
+    return S_OK;
 }
 
 static HRESULT WINAPI HTMLWindow2_get_navigator(IHTMLWindow2 *iface, IOmNavigator **p)
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index 267ac9e..b951724 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -4483,6 +4483,7 @@ static void test_window(IHTMLDocument2 *doc)
     IHTMLDocument2 *doc2 = NULL;
     IDispatch *disp;
     IUnknown *unk;
+    VARIANT v;
     BSTR str;
     HRESULT hres;
 
@@ -4545,6 +4546,11 @@ static void test_window(IHTMLDocument2 *doc)
        !strcmp_wa(str, "[object Window]") /* win7 ie9 */, "toString returned %s\n", wine_dbgstr_w(str));
     SysFreeString(str);
 
+    V_VT(&v) = VT_ERROR;
+    hres = IHTMLWindow2_get_opener(window, &v);
+    ok(hres == S_OK, "get_opener failed: %08x\n", hres);
+    ok(V_VT(&v) == VT_EMPTY, "V_VT(opener) = %d\n", V_VT(&v));
+
     test_window_name(window, NULL);
     set_window_name(window, "test");
     test_window_length(window, 0);




More information about the wine-cvs mailing list