summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/workers/constructors/Worker/same-origin.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 09:03:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 09:03:13 +0000
commit0681b3ac9a6ab4879ca2fbfcf8aa9d00a67b8365 (patch)
tree1437375a1c16af40bb2982577c25eb9608e17566 /testing/web-platform/tests/workers/constructors/Worker/same-origin.html
parentAdding debian version 115.11.0esr-1~deb12u1. (diff)
downloadfirefox-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/constructors/Worker/same-origin.html')
-rw-r--r--testing/web-platform/tests/workers/constructors/Worker/same-origin.html20
1 files changed, 10 insertions, 10 deletions
diff --git a/testing/web-platform/tests/workers/constructors/Worker/same-origin.html b/testing/web-platform/tests/workers/constructors/Worker/same-origin.html
index cdc36c1718..56dbfe3b3f 100644
--- a/testing/web-platform/tests/workers/constructors/Worker/same-origin.html
+++ b/testing/web-platform/tests/workers/constructors/Worker/same-origin.html
@@ -12,19 +12,19 @@
setup({allow_uncaught_exception: true});
function testWorkerHelper(t, script) {
- try {
- var worker = new Worker(script);
- worker.onerror = t.step_func_done(function(e) {
- assert_true(e instanceof Event);
- });
- } catch (e) {
- assert_throws_dom("SecurityError", () => {throw e}, "DOMExceptions thrown on cross-origin Worker construction must be SecurityErrors");
- t.done();
- }
+ var worker = new Worker(script);
+ worker.onerror = t.step_func_done(function(e) {
+ assert_true(e instanceof Event);
+ });
}
test(function() {
- assert_throws_dom("SecurityError", function() { new Worker('unsupported:'); });
+ assert_throws_dom("SyntaxError", function() { new Worker('https://test:test'); });
+}, "non-parsable URL");
+
+async_test(function(t) {
+ // Parses fine as a URL, fails to fetch according to Fetch
+ testWorkerHelper(t, 'unsupported:');
}, "unsupported_scheme");
async_test(function() {