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

Unified Diff: LayoutTests/http/tests/security/contentSecurityPolicy/1.1/meta-outside-head.html

Issue 132563006: CSP 1.1: <meta> delivery should be ignored outside <head>. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase. Created 6 years, 10 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/contentSecurityPolicy/1.1/meta-outside-head-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/security/contentSecurityPolicy/1.1/meta-outside-head.html
diff --git a/LayoutTests/http/tests/security/contentSecurityPolicy/source-list-parsing-paths-03.html b/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/meta-outside-head.html
similarity index 50%
copy from LayoutTests/http/tests/security/contentSecurityPolicy/source-list-parsing-paths-03.html
copy to LayoutTests/http/tests/security/contentSecurityPolicy/1.1/meta-outside-head.html
index a95042a7a1e26728080f2ccae0c9343afab4adbe..8b3b557c533b755e5135c1d19da45b0f5f081125 100644
--- a/LayoutTests/http/tests/security/contentSecurityPolicy/source-list-parsing-paths-03.html
+++ b/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/meta-outside-head.html
@@ -1,13 +1,16 @@
<!DOCTYPE html>
<html>
<head>
- <meta http-equiv="Content-Security-Policy" content="script-src 'unsafe-inline' example.com/js/">
<script>
if (window.testRunner)
testRunner.dumpAsText();
</script>
</head>
<body>
- <p>This test passes if the source expression does not throw an "invalid source" error.</p>
+ <p>This test checks that Content Security Policy delivered via a meta element is not enforced if the element is outside the document's head.</p>
+ <meta http-equiv="Content-Security-Policy" content="script-src 'none'">
+ <script>
+ alert("PASS (1/1)");
+ </script>
</body>
</html>
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/contentSecurityPolicy/1.1/meta-outside-head-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698