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

mshtml: Added IHTMLWindow2::get_self implementation.

parent ebb4a9b1
......@@ -321,8 +321,13 @@ static HRESULT WINAPI HTMLWindow2_open(IHTMLWindow2 *iface, BSTR url, BSTR name,
static HRESULT WINAPI HTMLWindow2_get_self(IHTMLWindow2 *iface, IHTMLWindow2 **p)
{
HTMLWindow *This = HTMLWINDOW2_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
/* FIXME: We should return kind of proxy window here. */
IHTMLWindow2_AddRef(HTMLWINDOW2(This));
*p = HTMLWINDOW2(This);
return S_OK;
}
static HRESULT WINAPI HTMLWindow2_get_top(IHTMLWindow2 *iface, IHTMLWindow2 **p)
......
......@@ -1821,7 +1821,7 @@ static void test_default_body(IHTMLBodyElement *body)
static void test_window(IHTMLDocument2 *doc)
{
IHTMLWindow2 *window;
IHTMLWindow2 *window, *window2, *self;
IHTMLDocument2 *doc2 = NULL;
HRESULT hres;
......@@ -1835,6 +1835,20 @@ static void test_window(IHTMLDocument2 *doc)
ok(doc2 != NULL, "doc2 == NULL\n");
IHTMLDocument_Release(doc2);
hres = IHTMLWindow2_get_window(window, &window2);
ok(hres == S_OK, "get_window failed: %08x\n", hres);
ok(window2 != NULL, "window2 == NULL\n");
hres = IHTMLWindow2_get_self(window, &self);
ok(hres == S_OK, "get_window failed: %08x\n", hres);
ok(window2 != NULL, "self == NULL\n");
ok(self == window2, "self != window2\n");
IHTMLWindow2_Release(window2);
IHTMLWindow2_Release(self);
IHTMLWindow2_Release(window);
}
......
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