Index: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/nonces/script-enforce-allowed.php |
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/nonces/script-enforce-allowed.php b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/nonces/script-enforce-allowed.php |
new file mode 100644 |
index 0000000000000000000000000000000000000000..62788b531bc01e5a29e5739d6a7444f19a06776d |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/nonces/script-enforce-allowed.php |
@@ -0,0 +1,13 @@ |
+<?php |
+ header("Content-Security-Policy: script-src 'self' 'nonce-abc'"); |
+?> |
+<!doctype html> |
+<script src="/resources/testharness.js"></script> |
+<script src="/resources/testharnessreport.js"></script> |
+<script nonce="abc"> |
+ var executed_test = async_test("Nonced script executes, and does not generate a violation report."); |
+ document.addEventListener('securitypolicyviolation', executed_test.unreached_func("No report should be generated")); |
+</script> |
+<script nonce="abc"> |
+ executed_test.done(); |
+</script> |