tor-browser

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

intercept-after-dispatch.html (520B)


      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  navigation.onnavigate = t.step_func(e => {
      8    t.step_timeout(t.step_func_done(() => {
      9      assert_equals(e.eventPhase, Event.NONE);
     10      assert_throws_dom("InvalidStateError", () => e.intercept());
     11    }), 0);
     12  });
     13 
     14  location.href = "#1";
     15 }, "event.intercept() throws if used after the dispatch phase");
     16 </script>