blob: 04eec718a1ac34611ae20624d282be8e838ca24c [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="script-src 'unsafe-inline'"/>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
</script>
</head>
<body>
<script>
function finish()
{
if (window.testRunner)
testRunner.notifyDone();
}
let context = new OfflineAudioContext(2, 100, 44100);
context.audioWorklet.addModule("http://127.0.0.1:8000/security/contentSecurityPolicy/resources/audioworklet-processor.js").then(() => {
console.log("FAIL: Audio worklet load was allowed by CSP");
finish();
}, (e) => {
console.log("PASS: Audio worklet load was successfuly prevented by CSP with " + e);
finish();
});
</script>
</body>
</html>