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> |