Worker-nested-importScripts-error.html (613B)
1 <!DOCTYPE html> 2 <title>This tests that errors from nested importScripts have the expected provenance.</title> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <script> 6 promise_test(t => { 7 let worker; 8 9 return new Promise((resolve) => { 10 worker = new Worker("support/importScripts-1.js"); 11 worker.onerror = resolve; 12 }).then(e => { 13 assert_equals(e.type, "error"); 14 assert_true(e.filename.indexOf('invalidScript.js') >= 0); 15 e.preventDefault(); 16 }); 17 }, 'Tests that errors from the import scripts come from the expected file.') 18 </script>