tor-browser

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

navigate-state-repeated-await.html (554B)


      1 <!doctype html>
      2 <script src="/resources/testharness.js"></script>
      3 <script src="/resources/testharnessreport.js"></script>
      4 <script>
      5 promise_test(async t => {
      6  navigation.onnavigate = e => e.intercept();
      7 
      8  await navigation.navigate('/foo', {state: {foo: 1}}).committed;
      9  assert_equals(navigation.currentEntry.getState().foo, 1);
     10  await navigation.navigate('/foo', {state: {foo: 2}}).committed;
     11  assert_equals(navigation.currentEntry.getState().foo, 2);
     12 }, "navigate() with state should work correctly when called repeatedly - with awaits");
     13 </script>