blob: 976f1fb5f1b797b93f190718e3953a5bfeb51770 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script>
if (window.testRunner)
testRunner.dumpAsText();
</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' 'nonce-dummy'">
<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 preloads a script resource with a nonce attribute.
<br>
<script nonce="check-for-preload">
checkForPreload("resources/zero-length.js", true);
</script>
<script src="resources/zero-length.js" nonce="dummy"></script>
</body>
</html>