diff options
Diffstat (limited to 'testing/web-platform/tests/content-security-policy/reporting/report-uri-effective-directive.html')
-rw-r--r-- | testing/web-platform/tests/content-security-policy/reporting/report-uri-effective-directive.html | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/testing/web-platform/tests/content-security-policy/reporting/report-uri-effective-directive.html b/testing/web-platform/tests/content-security-policy/reporting/report-uri-effective-directive.html new file mode 100644 index 0000000000..0143d1bc82 --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/reporting/report-uri-effective-directive.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html> +<head> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <title>Violation report is sent if violation occurs.</title> + <!-- CSP headers + Content-Security-Policy: default-src 'self'; report-uri /reporting/resources/report.py?op=put&reportID={{$id}} + --> +</head> +<body> + <script> + // This script block will trigger a violation report. + alert('FAIL'); + </script> + <script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=script-src%20%27self%27'></script> +</body> +</html> |