tor-browser

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

dispose-same-document-reload-with-intercept.html (663B)


      1 <!doctype html>
      2 <script src="/resources/testharness.js"></script>
      3 <script src="/resources/testharnessreport.js"></script>
      4 
      5 <script>
      6 promise_test(async (t) => {
      7  // Wait for after the load event so that the navigation doesn't get converted
      8  // into a replace navigation.
      9  await new Promise(r => window.onload = () => t.step_timeout(r, 0));
     10 
     11  navigation.currentEntry.ondispose = t.unreached_func("dispose must not happen for reloads");
     12 
     13  navigation.addEventListener("navigate", e => e.intercept());
     14 
     15  await navigation.reload().finished;
     16 }, "dispose events are not fired when doing a same-document reload using navigation.reload() and intercept()");
     17 </script>