Jacek Caban : mshtml: Added IHTMLDocument::get_Script implementation.
Alexandre Julliard
julliard at winehq.org
Mon Aug 25 06:20:48 CDT 2008
Module: wine
Branch: master
Commit: 480087666d5db11367819ff85fbb2aa874df338f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=480087666d5db11367819ff85fbb2aa874df338f
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Aug 25 10:08:40 2008 +0200
mshtml: Added IHTMLDocument::get_Script implementation.
---
dlls/mshtml/htmldoc.c | 8 ++++++--
dlls/mshtml/tests/dom.c | 7 +++++++
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c
index b1f063f..e5870d8 100644
--- a/dlls/mshtml/htmldoc.c
+++ b/dlls/mshtml/htmldoc.c
@@ -252,8 +252,12 @@ static HRESULT WINAPI HTMLDocument_Invoke(IHTMLDocument2 *iface, DISPID dispIdMe
static HRESULT WINAPI HTMLDocument_get_Script(IHTMLDocument2 *iface, IDispatch **p)
{
HTMLDocument *This = HTMLDOC_THIS(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ *p = (IDispatch*)HTMLWINDOW2(This->window);
+ IDispatch_AddRef(*p);
+ return S_OK;
}
static HRESULT WINAPI HTMLDocument_get_all(IHTMLDocument2 *iface, IHTMLElementCollection **p)
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index e7a2907..7e8c9bf 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -2026,6 +2026,7 @@ static void test_window(IHTMLDocument2 *doc)
{
IHTMLWindow2 *window, *window2, *self;
IHTMLDocument2 *doc2 = NULL;
+ IDispatch *disp;
HRESULT hres;
hres = IHTMLDocument2_get_parentWindow(doc, &window);
@@ -2052,6 +2053,12 @@ static void test_window(IHTMLDocument2 *doc)
IHTMLWindow2_Release(window2);
IHTMLWindow2_Release(self);
+ disp = NULL;
+ hres = IHTMLDocument2_get_Script(doc, &disp);
+ ok(hres == S_OK, "get_Script failed: %08x\n", hres);
+ ok(disp == (void*)window, "disp != window\n");
+ IDispatch_Release(disp);
+
IHTMLWindow2_Release(window);
}
More information about the wine-cvs
mailing list