blob: 1e911d75ba0350dcc3925c006d8b7331696a0981 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="/js-test-resources/js-test-pre.js"></script>
</head>
<body>
<script>
window.jsTestIsAsync = true;
description("This tests that Web Worker script redirects are loaded if same origin.");
var worker;
shouldNotThrow('worker = new Worker("http://127.0.0.1:8000/resources/redirect.php?url=http://127.0.0.1:8000/security/resources/worker-message-pass.js")');
worker.onmessage = function(event) {
testPassed("Allowed same origin Worker script load");
finishJSTest();
};
worker.onerror = function () {
testFailed("Should have allowed same origin Worker script load");
finishJSTest();
};
</script>
<script src="/js-test-resources/js-test-post.js"></script>
</body>
</html>