tor-browser

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

transition-finished-mark-as-handled.html (623B)


      1 <!doctype html>
      2 <script src="/resources/testharness.js"></script>
      3 <script src="/resources/testharnessreport.js"></script>
      4 
      5 <script>
      6 async_test(t => {
      7  navigation.addEventListener("navigate", e => {
      8    e.intercept({ handler: () => Promise.reject(new Error("oh no!")) });
      9  });
     10 
     11  window.onunhandledrejection = t.unreached_func("unhandledrejection must not fire");
     12 
     13  location.href = "?1";
     14 
     15  // Make sure to trigger the getter to ensure the promise materializes!
     16  navigation.transition.finished;
     17 
     18  t.step_timeout(() => t.done(), 10);
     19 }, "navigation.transition.finished must not trigger unhandled rejections");
     20 </script>