4 <script src=
"/resources/testharness.js"></script>
5 <script src=
"/resources/testharnessreport.js"></script>
7 if (document
.location
.hostname
== "127.0.0.1") {
8 document
.location
.hostname
= "subdomain.example.test";
11 document
.domain
= 'example.test';
13 assert_throws("SecurityError", function () {
14 new Worker("http://example.test/worker.js");
18 new Worker("resources/non-existent.js");
20 assert_unreached("Same-origin worker shouldn't throw.");
22 }, "SecurityError thrown when accessing another domain's worker.");