tor-browser

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

navigate-meta-refresh.html (986B)


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