| Index: LayoutTests/http/tests/htmlimports/csp-import-block-but-nonce-nested.html
|
| diff --git a/LayoutTests/http/tests/htmlimports/csp-import-block-but-nonce-nested.html b/LayoutTests/http/tests/htmlimports/csp-import-block-but-nonce-nested.html
|
| index 2aabddd3541627a373089ef5b819ea290f2ecd64..e7e9461fbc75c7f619e7a2fb1350a7d0438fb6af 100644
|
| --- a/LayoutTests/http/tests/htmlimports/csp-import-block-but-nonce-nested.html
|
| +++ b/LayoutTests/http/tests/htmlimports/csp-import-block-but-nonce-nested.html
|
| @@ -1,21 +1,30 @@
|
| <!DOCTYPE html>
|
| <html>
|
| <head>
|
| -<script>
|
| -</script>
|
| -<link id="target" rel="import" href="resources/child-having-nonce-policy.html">
|
| -<script src="/js-test-resources/js-test.js"></script>
|
| +<meta http-equiv="Content-Security-Policy" content="script-src http://localhost:8000 'nonce-hello'">
|
| +<link id="target" rel="import" href="http://localhost:8000/htmlimports/resources/child-having-nonce-policy.cgi">
|
| </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 nonce="hello">
|
| +function test(actual, expected, message)
|
| +{
|
| + if (actual === expected)
|
| + console.log("PASS");
|
| + else
|
| + console.log("FAIL:" + message);
|
| +}
|
| +
|
| +if (window.testRunner)
|
| + testRunner.dumpAsText();
|
| +
|
| +test(document.inlineScriptHasRun, undefined, "document.inlineScriptHasRun");
|
| +test(document.externalScriptHasRun, undefined, "document.externalScriptHasRun");
|
| +test(document.externalScriptWithNonceHasRun, true, "document.externalScriptWithNonceHasRun");
|
| +test(document.inlineScriptWithNonceHasRun, true, "document.inlineScriptWithNonceHasRun");
|
| +test(document.evalFromInlineHasRun, undefined, "document.evalFromInlineHasRun");
|
| +test(document.evalFromExternalHasRun, undefined, "document.evalFromExternalHasRun");
|
| +test(document.evalFromInlineWithNonceHasRun, undefined, "document.evalFromInlineWithNonceHasRun");
|
| +test(document.evalFromExternalWithNonceHasRun, undefined, "document.evalFromExternalWithNonceHasRun");
|
| </script>
|
| </body>
|
| </html>
|
|
|