Commit 2e77a62f authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

mshtml: Return failure in IHTMLDocument2::frames for detached documents.

parent ffb7ace4
......@@ -914,11 +914,13 @@ static HRESULT WINAPI HTMLDocument_get_frames(IHTMLDocument2 *iface, IHTMLFrames
TRACE("(%p)->(%p)\n", This, p);
if(!This->outer_window) {
if(!This->window) {
/* Not implemented by IE */
return E_NOTIMPL;
}
return IHTMLWindow2_get_frames(&This->outer_window->base.IHTMLWindow2_iface, p);
if(!This->window->base.outer_window)
return E_FAIL;
return IHTMLWindow2_get_frames(&This->window->base.outer_window->base.IHTMLWindow2_iface, p);
}
static HRESULT WINAPI HTMLDocument_get_embeds(IHTMLDocument2 *iface, IHTMLElementCollection **p)
......
......@@ -119,6 +119,7 @@ function detached_iframe_doc() {
expect_exception(function() { origDoc.onclick; }, true);
expect_exception(function() { origDoc.toString; }, true);
expect_exception(function() { origDoc.toString(); }, true);
expect_exception(function() { origDoc.frames; });
expect_exception(function() { origDoc.readyState; }, true);
expect_exception(function() { origDoc.URL; });
expect_exception(function() { origDoc.URL = "blank.html"; });
......
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