summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/workers/modules/dedicated-worker-import-failure.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/workers/modules/dedicated-worker-import-failure.html')
-rw-r--r--testing/web-platform/tests/workers/modules/dedicated-worker-import-failure.html9
1 files changed, 6 insertions, 3 deletions
diff --git a/testing/web-platform/tests/workers/modules/dedicated-worker-import-failure.html b/testing/web-platform/tests/workers/modules/dedicated-worker-import-failure.html
index 4c705e7325..d4e104760e 100644
--- a/testing/web-platform/tests/workers/modules/dedicated-worker-import-failure.html
+++ b/testing/web-platform/tests/workers/modules/dedicated-worker-import-failure.html
@@ -46,9 +46,12 @@ test(() => {
assert_throws_dom('SyntaxError', () => new Worker(scriptURL, { type: 'module' }));
}, 'Worker construction for an invalid URL should throw an exception.');
-test(() => {
+async_test((t) => {
const scriptURL = 'file:///static-import-worker.js';
- assert_throws_dom('SecurityError', () => new Worker(scriptURL, { type: 'module' }));
-}, 'Worker construction for a file URL should throw an exception.');
+ const worker = new Worker(scriptURL, { type: 'module' });
+ worker.onerror = t.step_func_done(function(e) {
+ assert_true(e instanceof Event);
+ });
+}, 'Worker construction for a file URL should fail');
</script>