mshtml: Added better IHTMLWindow2::get_opener stub.

This commit is contained in:
Jacek Caban 2012-04-10 12:53:03 +02:00 committed by Alexandre Julliard
parent 272535b948
commit 8e71096fd1
2 changed files with 11 additions and 2 deletions

View File

@ -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)

View File

@ -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);