<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi Hans,<br>
      <br>
      On 10/13/14 13:56, Hans Leidekker wrote:<br>
    </div>
    <blockquote cite="mid:1413201410.15627.2.camel@codeweavers.com"
      type="cite">
      <div class="moz-text-plain" wrap="true" graphical-quote="true"
        style="font-family: -moz-fixed; font-size: 12px;"
        lang="x-western">
        <pre wrap=""> HRESULT go_back(DocHost *This)
 {
+    HRESULT hres;
+
     if(!This->travellog.position) {
         WARN("No history available\n");
         return E_FAIL;
     }
 
-    return navigate_history(This, This->travellog.position-1);
+    hres = navigate_history(This, This->travellog.position-1);
+    if(SUCCEEDED(hres))
+        on_commandstate_change(This, CSC_NAVIGATEFORWARD, VARIANT_TRUE);</pre>
      </div>
    </blockquote>
    <br>
    We probably shouldn't call this notification if forward navigation
    was already possible before the call. Also, if we reach the bottom
    of history stack, we should also probably notify that back
    navigation is no longer possible. It would be more generic and
    easier to get right if you did that in navigate_history, based on
    previous and current history position.<br>
    <br>
    <blockquote cite="mid:1413201410.15627.2.camel@codeweavers.com"
      type="cite">
      <div class="moz-text-plain" wrap="true" graphical-quote="true"
        style="font-family: -moz-fixed; font-size: 12px;"
        lang="x-western">
        <pre wrap="">
 HRESULT get_location_url(DocHost *This, BSTR *ret)
diff --git a/dlls/ieframe/tests/webbrowser.c b/dlls/ieframe/tests/webbrowser.c
index fa37169..238b6de 100644
--- a/dlls/ieframe/tests/webbrowser.c
+++ b/dlls/ieframe/tests/webbrowser.c
@@ -3022,7 +3022,7 @@ static void test_go_back(IWebBrowser2 *wb, const char *back_url)
     hres = IWebBrowser2_GoBack(wb);
     ok(hres == S_OK, "GoBack failed: %08x\n", hres);
     CHECK_CALLED(Invoke_BEFORENAVIGATE2);
-    todo_wine CHECK_CALLED(Invoke_COMMANDSTATECHANGE);
+    CHECK_CALLED(Invoke_COMMANDSTATECHANGE);
     CLEAR_CALLED(Invoke_PROPERTYCHANGE); /* called by IE11 */
 }
 
@@ -3038,7 +3038,7 @@ static void test_go_forward(IWebBrowser2 *wb, const char *forward_url)
     hres = IWebBrowser2_GoForward(wb);
     ok(hres == S_OK, "GoForward failed: %08x\n", hres);
     CHECK_CALLED(Invoke_BEFORENAVIGATE2);
-    todo_wine CHECK_CALLED(Invoke_COMMANDSTATECHANGE);
+    CHECK_CALLED(Invoke_COMMANDSTATECHANGE);

</pre>
      </div>
    </blockquote>
    <br>
    I would be nice to have those tests stricter. For example, by
    checking command in COMMANDSTATECHANGE notification and have
    separated Invoke_COMMANDSTATECHANGE_NAVIGATEFORWARD and
    Invoke_COMMANDSTATECHANGE_NAVIGATEBACK.<br>
    <br>
    Thanks,<br>
    Jacek<br>
  </body>
</html>