blob: 158c3a6a2fa3edf187c4331b9530d2e8c062a277 [file] [log] [blame]
#!/usr/bin/env python3
import sys
sys.stdout.write(
'Content-Security-Policy-Report-Only: script-src \'nonce-dummy\' \'nonce-dump-as-text\'\r\n'
'Content-Security-Policy: script-src \'nonce-that-is-not-equal-to-dummy\' \'nonce-dump-as-text\'\r\n'
'Content-Type: text/html\r\n\r\n'
'<!DOCTYPE html>\n'
'<html>\n'
'<head>\n'
'<meta http-equiv="Content-Security-Policy" content="script-src \'nonce-that-is-not-equal-to-dummy\' \'nonce-dump-as-text\'">\n'
'<script nonce="dump-as-text">\n'
'if (window.testRunner)\n'
' testRunner.dumpAsText();\n'
'</script>\n'
'</head>\n'
'<body>\n'
'<p id="result">PASS did not execute script.</p>\n'
'<script nonce="dummy">\n'
'document.getElementById("result").textContent = "FAIL did execute script.";\n'
'</script>\n'
'</body>\n'
'</html>\n'
)