tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

navigate-history-go-0.html (1015B)


      1 <!doctype html>
      2 <script src="/resources/testharness.js"></script>
      3 <script src="/resources/testharnessreport.js"></script>
      4 <iframe id="i" src="/common/blank.html"></iframe>
      5 <script>
      6 async_test(t => {
      7  window.onload = t.step_func(() => {
      8    i.contentWindow.navigation.onnavigate = t.step_func_done(e => {
      9      assert_equals(e.navigationType, "reload");
     10      assert_true(e.cancelable);
     11      assert_true(e.canIntercept);
     12      assert_false(e.userInitiated);
     13      assert_false(e.hashChange);
     14      assert_equals(e.downloadRequest, null);
     15      assert_equals(new URL(e.destination.url).pathname, "/common/blank.html");
     16      assert_false(e.destination.sameDocument);
     17      assert_equals(e.destination.key, "");
     18      assert_equals(e.destination.id, "");
     19      assert_equals(e.destination.index, -1);
     20      assert_equals(e.formData, null);
     21      assert_equals(e.sourceElement, null);
     22      e.preventDefault();
     23    });
     24 
     25    i.contentWindow.history.go(0);
     26  });
     27 }, "history.go(0) fires the navigate event");
     28 </script>