From: Jacek Caban Subject: [PATCH 2/2] mshtml: Added IHTMLDocument2::get_frames implementation Message-Id: <4F328D8D.1000800@codeweavers.com> Date: Wed, 08 Feb 2012 15:58:21 +0100 For bug 29116. --- dlls/mshtml/htmldoc.c | 6 ++++-- dlls/mshtml/tests/dom.c | 8 ++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 039893e..46838d6 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -471,8 +471,10 @@ static HRESULT WINAPI HTMLDocument_get_readyState(IHTMLDocument2 *iface, BSTR *p static HRESULT WINAPI HTMLDocument_get_frames(IHTMLDocument2 *iface, IHTMLFramesCollection2 **p) { HTMLDocument *This = impl_from_IHTMLDocument2(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + return IHTMLWindow2_get_frames(&This->window->IHTMLWindow2_iface, p); } static HRESULT WINAPI HTMLDocument_get_embeds(IHTMLDocument2 *iface, IHTMLElementCollection **p) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 6ceb9ea..8df47cc 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -5913,6 +5913,14 @@ static void test_frameset(IHTMLDocument2 *doc) test_frames_collection(frames, "fr1"); IHTMLFramesCollection2_Release(frames); + hres = IHTMLDocument2_get_frames(doc, &frames); + ok(hres == S_OK, "IHTMLDocument2_get_frames failed: 0x%08x\n", hres); + if(FAILED(hres)) + return; + + test_frames_collection(frames, "fr1"); + IHTMLFramesCollection2_Release(frames); + /* test using IHTMLWindow2 inheritance */ test_frames_collection((IHTMLFramesCollection2*)window, "fr2");