From: Jacek Caban Subject: mshtml: Added IHTMLWindow2::navigate implementation. Message-Id: <53D6C71B.1020503@codeweavers.com> Date: Mon, 28 Jul 2014 23:56:43 +0200 --- dlls/mshtml/htmlwindow.c | 6 ++++-- dlls/mshtml/tests/nav_test.html | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index fab227e..bc648f3 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -1010,8 +1010,10 @@ static HRESULT WINAPI HTMLWindow2_get_window(IHTMLWindow2 *iface, IHTMLWindow2 * static HRESULT WINAPI HTMLWindow2_navigate(IHTMLWindow2 *iface, BSTR url) { HTMLWindow *This = impl_from_IHTMLWindow2(iface); - FIXME("(%p)->(%s)\n", This, debugstr_w(url)); - return E_NOTIMPL; + + TRACE("(%p)->(%s)\n", This, debugstr_w(url)); + + return navigate_url(This->outer_window, url, This->outer_window->uri, BINDING_NAVIGATED); } static HRESULT WINAPI HTMLWindow2_put_onfocus(IHTMLWindow2 *iface, VARIANT v) diff --git a/dlls/mshtml/tests/nav_test.html b/dlls/mshtml/tests/nav_test.html index d106dfc..bc629a4 100644 --- a/dlls/mshtml/tests/nav_test.html +++ b/dlls/mshtml/tests/nav_test.html @@ -18,6 +18,7 @@ function nav_back_test() { } iframe.onload = function() { + iframe.onload = null; var href = iframe.contentWindow.location.href; ok(/.*blank2.html/.test(href), "Unexpected href " + href); next_test(); @@ -27,8 +28,24 @@ function nav_back_test() { subframe.src = "blank.html"; } +function window_navigate_test() { + external.trace("Runnint window.navigate() tests..."); + + var iframe = document.getElementById("testframe"); + + iframe.onload = function() { + iframe.onlod = null; + var href = iframe.contentWindow.location.href; + ok(href === "about:blank", "Unexpected href " + href); + next_test(); + } + + iframe.contentWindow.navigate("about:blank"); +} + var tests = [ nav_back_test, + window_navigate_test, function() { external.reportSuccess(); } ];