summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/workers/Worker_cross_origin_security_err.htm
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/workers/Worker_cross_origin_security_err.htm')
-rw-r--r--testing/web-platform/tests/workers/Worker_cross_origin_security_err.htm12
1 files changed, 1 insertions, 11 deletions
diff --git a/testing/web-platform/tests/workers/Worker_cross_origin_security_err.htm b/testing/web-platform/tests/workers/Worker_cross_origin_security_err.htm
index 8417adbefd..a3e49df79a 100644
--- a/testing/web-platform/tests/workers/Worker_cross_origin_security_err.htm
+++ b/testing/web-platform/tests/workers/Worker_cross_origin_security_err.htm
@@ -6,26 +6,16 @@
<div id=log></div>
<script>
async_test(function(t) {
- try {
var w = new Worker("ftp://example.org/support/WorkerBasic.js");
w.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();
- }
-}, "Cross-origin classic workers should fail to fetch");
+ }, "Cross-origin classic workers should fail to fetch");
async_test(function(t) {
- try {
var w = new Worker("ftp://example.org/support/WorkerBasic.js", {type: "module"});
w.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 module Worker construction must be SecurityErrors");
- t.done();
- }
}, "Cross-origin module workers should fail to fetch");
</script>