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

Unified Diff: LayoutTests/http/tests/htmlimports/csp-in-imports.html

Issue 19940002: [HTML Import] Respect Content Security Policy Model (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix Mac build failure Created 7 years, 5 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/htmlimports/csp-in-imports.html
diff --git a/LayoutTests/http/tests/htmlimports/csp-in-imports.html b/LayoutTests/http/tests/htmlimports/csp-in-imports.html
new file mode 100644
index 0000000000000000000000000000000000000000..4b943dc637ab4c7a4d1ab6b2843cb1a195c0001d
--- /dev/null
+++ b/LayoutTests/http/tests/htmlimports/csp-in-imports.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link id="havingDirectiveInMeta" rel="import" href="resources/having-csp-directive.html">
+<link id="havingDirectiveInHTTP" rel="import" href="resources/csp-blocking.cgi">
+</head>
+<body>
+<pre id="result"></pre>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+if (window.havingDirectiveInMeta.import.querySelector("#shouldBeBlocked").import == null)
+ result.innerHTML += "PASS\n";
+else
+ result.innerHTML += "FAIL: The import should be blocked.\n";
+
+if (window.havingDirectiveInHTTP.import.querySelector("#shouldBeBlocked").import == null)
+ result.innerHTML += "PASS\n";
+else
+ result.innerHTML += "FAIL: The import should be blocked.\n";
+
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698