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

mshtml: Added IHTMLWindow2::navigate implementation.

parent 7c5d0789
......@@ -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)
......
......@@ -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(); }
];
......
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