Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/embeddedEnforcement/allow_csp_header-cross-origin-enforcement.html

Issue 2404373003: Experimental Feature: Allow-CSP-From header (Closed)
Patch Set: Without all those style changes Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/embeddedEnforcement/allow_csp_header-cross-origin-enforcement.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/embeddedEnforcement/allow_csp_header-cross-origin-enforcement.html b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/embeddedEnforcement/allow_csp_header-cross-origin-enforcement.html
new file mode 100644
index 0000000000000000000000000000000000000000..e0b2a07e03b60c0510d58e1ced82c75bfcee145c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/embeddedEnforcement/allow_csp_header-cross-origin-enforcement.html
@@ -0,0 +1,14 @@
+<head>
+ <script src="/js-test-resources/js-test.js"></script>
+ <script src="/security/contentSecurityPolicy/resources/child-src-test.js"></script>
+</head>
+<body>
+ <script>
+ description("Allow-CSP-From header enforces new policies from the parent.");
+ csp = "script-src 'unsafe-inline'; img-src 'none'";
+ // localhost is cross-origin for 127.0.0.1
+ url = "http://localhost:8000/security/contentSecurityPolicy/resources/respond-with-allow-csp-from-header.php?allow_csp_from=" + "http://127.0.0.1:8000";
+ injectFrameWithCSP(url, csp, EXPECT_LOAD, CROSS_ORIGIN);
+ </script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698