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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/get-embedding-csp-header-and-respond.php

Issue 2372563002: Adding Embedding-CSP HTTP header (Closed)
Patch Set: Moving requiredCSP to FrameLoader Created 4 years, 3 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/resources/get-embedding-csp-header-and-respond.php
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/get-embedding-csp-header-and-respond.php b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/get-embedding-csp-header-and-respond.php
new file mode 100644
index 0000000000000000000000000000000000000000..38dcc9f2d26cbdc8f34a9e1f7da0f5c28e80d48f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/get-embedding-csp-header-and-respond.php
@@ -0,0 +1,10 @@
+<?php
+ $embedding_csp_header = isset($_SERVER['HTTP_EMBEDDING_CSP']) ? $_SERVER['HTTP_EMBEDDING_CSP'] : 'null';
+?>
+
+<script>
+ var response = {};
+ response['src'] = '../resources/get-embedding-csp-header-and-respond.php';
+ response['embedding_csp'] = "<?php echo $embedding_csp_header; ?>";
+ window.top.postMessage(response, '*');
+</script>

Powered by Google App Engine
This is Rietveld 408576698