blob: 424f828c616a8dbdf527d72ab17060ae20c35c75 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="child-src http://127.0.0.1:8000/resources/redirect.py">
<script src="/js-test-resources/js-test-pre.js"></script>
</head>
<body>
<script>
window.jsTestIsAsync = true;
description("This tests that the Content Security Policy of the page allows loading a Web Worker's script redirected on the same origin.");
var worker;
shouldNotThrow('worker = new Worker("http://127.0.0.1:8000/resources/redirect.py?url=http://127.0.0.1:8000/security/resources/worker-message-pass.js")');
worker.onmessage = function(event) {
testPassed(event.data);
finishJSTest();
};
worker.onerror = function () {
testFailed("error event dispatched");
finishJSTest();
};
</script>
<script src="/js-test-resources/js-test-post.js"></script>
</body>
</html>