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: LayoutTests/http/tests/security/contentSecurityPolicy/resources/test-csp-header.pl

Issue 1009583003: Add CSP header for resources with an active policy (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add return statement to avoid compiler error Created 5 years, 9 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: LayoutTests/http/tests/security/contentSecurityPolicy/resources/test-csp-header.pl
diff --git a/LayoutTests/http/tests/security/contentSecurityPolicy/resources/test-csp-header.pl b/LayoutTests/http/tests/security/contentSecurityPolicy/resources/test-csp-header.pl
new file mode 100755
index 0000000000000000000000000000000000000000..55dc114e0f709d3dbea0835f6010171fb947af61
--- /dev/null
+++ b/LayoutTests/http/tests/security/contentSecurityPolicy/resources/test-csp-header.pl
@@ -0,0 +1,13 @@
+#!/usr/bin/perl
+
+if ($ENV{HTTP_CSP} eq "active") {
+ print "Status: 200\r\n";
+ print "Content-type: application/javascript\r\n";
+ print "\r\n";
+ print "script_loaded = true;\r\n\r\n"
+} else {
+ print "Status: 404\r\n";
+ print "Content-type: text/html\r\n";
+ print "\r\n";
+ print "CSP header not sent\r\n\r\n";
+}

Powered by Google App Engine
This is Rietveld 408576698