blob: 16057c7fb594c2573b0a9677186b655825fb439c [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="worker-src blob:; script-src 'unsafe-inline' http://127.0.0.1:8000"/>
<script src="/js-test-resources/testharness.js"></script>
<script src="/js-test-resources/testharnessreport.js"></script>
</head>
<body>
<script>
async_test(function () {
var blob = new Blob([
"try {" +
" importScripts('http://localhost:8000/security/contentSecurityPolicy/resources/post-message.js');" +
"} catch (err) { }" +
"postMessage('done');"
]);
var worker = new Worker(window.URL.createObjectURL(blob));
worker.onmessage = this.step_func(function (evt) {
this.done();
});
}, "Blob worker inherits CSP");
</script>
</body>
</html>