tor-browser

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

navigate-intercept-history-state.html (536B)


      1 <!doctype html>
      2 <script src="/resources/testharness.js"></script>
      3 <script src="/resources/testharnessreport.js"></script>
      4 <script>
      5 promise_test(async () => {
      6  history.replaceState("state1", "", "#1");
      7  assert_equals(history.state, "state1");
      8 
      9  navigation.onnavigate = e => e.intercept({ handler: () => Promise.resolve("r") });
     10  await navigation.navigate("#2").committed;
     11  assert_equals(location.hash, "#2");
     12  assert_equals(history.state, null);
     13 }, "history.story should be nulled by navigate() handled by intercept()");
     14 </script>