blob: 28eb9fdd7a93c8f3e06b6d1ce14b9ac416b3e1de [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
if (document.location.hostname == "127.0.0.1") {
document.location.hostname = "subdomain.example.test";
} else {
test(function () {
document.domain = 'example.test';
assert_throws_dom("SecurityError", function () {
new Worker("http://example.test/worker.js");
});
try {
new Worker("resources/non-existent.js");
} catch (e) {
assert_unreached("Same-origin worker shouldn't throw.");
}
}, "SecurityError thrown when accessing another domain's worker.");
}
</script>
</head>
<body>
</body>
</html>