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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/respond-with-allow-csp-from-header.php

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/resources/respond-with-allow-csp-from-header.php
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/respond-with-allow-csp-from-header.php b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/respond-with-allow-csp-from-header.php
new file mode 100644
index 0000000000000000000000000000000000000000..bff974dbf4aec46d99ee52f4e44c9ec4a6a6e10b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/respond-with-allow-csp-from-header.php
@@ -0,0 +1,22 @@
+<?php
+ $allow_csp_from = isset($_GET['allow_csp_from']) ? $_GET['allow_csp_from'] : null;
+ if ($allow_csp_from)
+ header('Allow-CSP-From: ' . $allow_csp_from);
+ $csp = isset($_GET['csp']) ? $_GET['csp'] : null;
+ if ($csp)
+ header('Content-Security-Policy: ' . $csp);
+?>
+
+<!DOCTYPE html>
+<html>
+<head>
+ <title>This page enforces embedder's policies</title>
+</head>
+<body>
+ Hello World.
+ <iframe src="/cross-site/b.com/title2.html"></iframe>
+ <img src="green250x50.png" />
+ <script> alert("Hello from iframe");</script>
+ <script> window.top.postMessage('loaded', '*'); </script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698