tor-browser

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

async-dynamic-module-error.html (820B)


      1 <!doctype html>
      2 <meta charset=utf-8>
      3 <title>Load dynamically imported async modules which errors</title>
      4 <script src=/resources/testharness.js></script>
      5 <script src=/resources/testharnessreport.js></script>
      6 <script>
      7  setup({allow_uncaught_exception: true});
      8  var test = async_test("Load dynamically imported async modules with error")
      9  window.addEventListener("error", scriptError);
     10  function scriptError(e) {
     11    // An error is expected
     12    test.step(() => assert_true(e.message !== "FAIL"));
     13  }
     14  function scriptLoaded() {
     15    test.done();
     16  }
     17  function testNoError() {
     18    test.step(() => assert_unreached("No event expected here"));
     19    test.done();
     20  }
     21 </script>
     22 <script type="module"
     23 			src="./support/async_dynamic_module_error.js"
     24        onerror="testNoError()"
     25        onload="scriptLoaded()"></script>