Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /content-security-policy/script-src/eval-allowed-in-report-only-mode-and-sends-report.html - WPT Dashboard Interop Dashboard
<html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!-- Content-Security-Policy-Report-Only: script-src 'unsafe-inline'; report-uri /reporting/resources/report.py?op=put&reportID={{$id}} -->
</head>
<body>
<script>
var t = async_test("Eval is allowed because the CSP is report-only");
try {
eval("t.done()");
} catch {
t.step(function() { assert_true(false, "The eval should have execute succesfully"); })
}
</script>
<script async defer src="../support/checkReport.sub.js?reportField=blocked-uri&reportValue=eval"></script>
</body>
</html>