mshtml: Added IHTMLWindow2::navigate implementation.

This commit is contained in:
Jacek Caban 2014-07-28 23:56:43 +02:00 committed by Alexandre Julliard
parent 7c5d0789d0
commit be2128fd05
2 changed files with 21 additions and 2 deletions

View File

@ -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)

View File

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