Jacek Caban : mshtml: Added IHTMLWindow2::navigate implementation.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jul 28 20:50:43 CDT 2014


Module: wine
Branch: master
Commit: be2128fd059ec1e1786c70fda347d6ce37de2cd6
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=be2128fd059ec1e1786c70fda347d6ce37de2cd6

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Jul 28 23:56:43 2014 +0200

mshtml: Added IHTMLWindow2::navigate implementation.

---

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




More information about the wine-cvs mailing list