blob: 443947b824368cabaaf891d1de43a1f32eda887c [file] [edit]
<!DOCTYPE html>
<html>
<head>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.dumpFrameLoadCallbacks();
}
</script>
<meta http-equiv="Content-Security-Policy" content="script-src http://127.0.0.1:8000/resources/slow-script.pl http://127.0.0.1:8000/resources/checkPreload.js 'nonce-check-for-preload'">
<script src="http://127.0.0.1:8000/resources/slow-script.pl?delay=1000"></script>
<script src="http://127.0.0.1:8000/resources/checkPreload.js"></script>
</head>
<body>
This test makes sure that the Preload scanner does not preload a script resource that is blocked by the Content Security Policy of the page.
<br>
<script nonce="check-for-preload">
checkForPreload("resources/zero-length.js", false);
</script>
<script src="resources/zero-length.js"></script>
</body>
</html>