Debian Codegraph @

testing/web-platform/mozilla/tests/html/semantics/scripting-1/the-script-element/async-module-circular.html

raw
1 <!doctype html>
2 <meta charset=utf-8>
3 <title>Load async modules circular</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 async module")
9 window.addEventListener("error", scriptError);
10 function scriptError(e) {
11 // An error is expected
12 test.step(() => assert_true(e.message !== "FAIL"));
13 test.done();
14 }
15 function scriptLoaded() {
16 test.step(() => assert_unreached("Should not load before error"));
17 test.done();
18 }
19 function testNoError() {
20 test.step(() => assert_unreached("No event expected here"));
21 test.done();
22 }
23 </script>
24 <script type="module"
25 src="./support/async_module_circular.js"
26 onerror="testNoError()"
27 onload="scriptLoaded()">
28 </script>