nested-imports.html (821B)
1 <!DOCTYPE html> 2 <title>Test imports under more than 3 levels in different modules</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 window.log = []; 10 11 const test_load = async_test("should load all modules successfully"); 12 window.addEventListener( 13 "load", 14 test_load.step_func_done((ev) => { 15 assert_equals(log.length, 2); 16 17 assert_equals(log[0], 1); 18 assert_equals(log[1], 2); 19 }) 20 ); 21 22 function unreachable() { 23 log.push("unexpected"); 24 } 25 </script> 26 <script type="module" src="./nested-imports-a.js" onerror="unreachable()" 27 onload="log.push(1)"></script> 28 <script type="module" src="./nested-imports-e.js" onerror="unreachable()" 29 onload="log.push(2)"></script>