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

Unified Diff: LayoutTests/http/tests/security/contentSecurityPolicy/csp-header-is-sent.html

Issue 1009583003: Add CSP header for resources with an active policy (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: consider plugin-types for sending CSP header on plugin requests 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/csp-header-is-sent.html
diff --git a/LayoutTests/http/tests/security/contentSecurityPolicy/csp-header-is-sent.html b/LayoutTests/http/tests/security/contentSecurityPolicy/csp-header-is-sent.html
new file mode 100644
index 0000000000000000000000000000000000000000..615af49eaaea151c84f628b6e2470c72aa249fb4
--- /dev/null
+++ b/LayoutTests/http/tests/security/contentSecurityPolicy/csp-header-is-sent.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <meta http-equiv="Content-Security-Policy" content="script-src http://127.0.0.1:8000/">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- This sets 'script_loaded' to true if the CSP header is present. -->
Mike West 2015/03/20 14:53:54 Nit: Can you add a negative test as well, verifyin
estark 2015/03/20 20:27:52 csp-header-is-sent.js already sends an XHR and che
Mike West 2015/03/21 11:33:39 You're right. I should have looked more carefully
+ <script src="resources/test-csp-header.pl"></script>
+ <script src="resources/csp-header-is-sent.js"></script>
+</head>
+<body>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698