diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-17 09:03:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-17 09:03:13 +0000 |
commit | 0681b3ac9a6ab4879ca2fbfcf8aa9d00a67b8365 (patch) | |
tree | 1437375a1c16af40bb2982577c25eb9608e17566 /testing/web-platform/tests/workers/modules/dedicated-worker-import-failure.html | |
parent | Adding debian version 115.11.0esr-1~deb12u1. (diff) | |
download | firefox-esr-0681b3ac9a6ab4879ca2fbfcf8aa9d00a67b8365.tar.xz firefox-esr-0681b3ac9a6ab4879ca2fbfcf8aa9d00a67b8365.zip |
Merging upstream version 115.12.0esr.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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.html | 9 |
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> |