Chromium Code Reviews

Unified Diff: LayoutTests/http/tests/htmlimports/resources/having-nonce-policy.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/resources/having-nonce-policy.html
diff --git a/LayoutTests/http/tests/htmlimports/resources/having-nonce-policy.html b/LayoutTests/http/tests/htmlimports/resources/having-nonce-policy.html
new file mode 100644
index 0000000000000000000000000000000000000000..5bd9f84280112f837d0db788369cd7d047a0adcd
--- /dev/null
+++ b/LayoutTests/http/tests/htmlimports/resources/having-nonce-policy.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Security-Policy" content="script-src 'nonce-hello'">
+<script src="external-script.js"></script>
+<script nonce="hello" src="external-script-with-nonce.js"></script>
+<script>
+document.inlineScriptHasRun = true;
+eval("document.evalFromInlineHasRun = true;");
+</script>
+
+<script nonce="hello">
+document.inlineScriptWithNonceHasRun = true;
+eval("document.evalFromInlineWithNonceHasRun = true;");
+</script>
+</head>
+</html>

Powered by Google App Engine