Chromium Code Reviews

Unified Diff: LayoutTests/http/tests/htmlimports/csp-import-block-but-nonce.html

Issue 19762002: [HTML Imports] Let script of imported document running. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Made a test more robust. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: LayoutTests/http/tests/htmlimports/csp-import-block-but-nonce.html
diff --git a/LayoutTests/http/tests/htmlimports/csp-import-block-but-nonce.html b/LayoutTests/http/tests/htmlimports/csp-import-block-but-nonce.html
new file mode 100644
index 0000000000000000000000000000000000000000..4844abe5e7c42244993d098692ae03c0c45230e9
--- /dev/null
+++ b/LayoutTests/http/tests/htmlimports/csp-import-block-but-nonce.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+</script>
+<link id="target" rel="import" href="resources/having-nonce-policy.html">
+<script src="/js-test-resources/js-test-pre.js"></script>
+</head>
+<body>
+<script>
+shouldBe("document.inlineScriptHasRun", "undefined");
+shouldBe("document.externalScriptHasRun", "undefined");
+shouldBeTrue("document.externalScriptWithNonceHasRun");
+shouldBeTrue("document.inlineScriptWithNonceHasRun");
+shouldBe("document.evalFromInlineHasRun", "undefined");
+shouldBe("document.evalFromExternalHasRun", "undefined");
+shouldBe("document.evalFromInlineWithNonceHasRun", "undefined");
+shouldBe("document.evalFromExternalWithNonceHasRun", "undefined");
+</script>
+<script src="/js-test-resources/js-test-post.js"></script>
+</body>
+</html>

Powered by Google App Engine