blob: c4005f8d0a8ba57aebdf00fda7974bdc8fe1bc33 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="script-src 'unsafe-inline'"/>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
}
</script>
</head>
<body>
<script>
try {
// We ignore the message posted by the worker (by not registering an onmessage handler) as we are only interested in knowing whether an exception occurred.
var worker = new Worker('http://127.0.0.1:8000/security/contentSecurityPolicy/resources/worker.php?type=post-message-pass&csp=' +
encodeURIComponent("script-src 'self' 'unsafe-inline'"));
alert("PASS");
} catch (e) {
alert(e);
}
</script>
</body>
</html>