OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <title>html-script-module-instantiation-error-2</title> |
| 3 |
| 4 <script src="/resources/testharness.js"></script> |
| 5 <script src="/resources/testharnessreport.js"></script> |
| 6 <script> |
| 7 setup({allow_uncaught_exception: true}); |
| 8 |
| 9 var log = []; |
| 10 |
| 11 window.addEventListener("error", ev => log.push(ev.error)); |
| 12 |
| 13 var test_load = async_test("test_load"); |
| 14 window.addEventListener("load", test_load.step_func_done(ev => { |
| 15 const exn = log[0]; |
| 16 assert_array_equals(log, [exn, 1, exn, 2, exn, 3, exn, 4, exn, 5]); |
| 17 assert_equals(exn.constructor, SyntaxError); |
| 18 })); |
| 19 |
| 20 function unreachable() { |
| 21 log.push("unexpected"); |
| 22 } |
| 23 </script> |
| 24 <script type="module" src="./missing-export-nested.js" |
| 25 onerror="unreachable()" onload="log.push(1)"></script> |
| 26 <script type="module" src="./missing-export-nested.js" |
| 27 onerror="unreachable()" onload="log.push(2)"></script> |
| 28 <script type="module" src="./missing-export.js" |
| 29 onerror="unreachable()" onload="log.push(3)"></script> |
| 30 <script type="module" src="./missing-export-nested.js" |
| 31 onerror="unreachable()" onload="log.push(4)"></script> |
| 32 <script type="module" src="./missing-export.js" |
| 33 onerror="unreachable()" onload="log.push(5)"></script> |
OLD | NEW |