Use dumpJSConsoleLogInStdErr=true webkit-test-runner option for non-imported tests...
[WebKit-https.git] / LayoutTests / http / tests / security / contentSecurityPolicy / block-all-mixed-content / insecure-css-in-main-frame.html
1 <!DOCTYPE html><!-- webkit-test-runner [ dumpJSConsoleLogInStdErr=true ] -->
2 <html>
3 <head>
4 <script>
5 if (window.testRunner) {
6     testRunner.dumpAsText();
7     testRunner.dumpChildFramesAsText();
8     testRunner.dumpFrameLoadCallbacks();
9     testRunner.setCanOpenWindows();
10     testRunner.setCloseRemainingWindowsWhenComplete(true);
11     testRunner.waitUntilDone();
12 }
13
14 window.addEventListener("message", function (messageEvent) {
15     document.getElementById("console").textContent = messageEvent.data + "\n";
16     if (window.testRunner)
17         testRunner.notifyDone();
18 }, false);
19 </script>
20 </head>
21 <body>
22 <p>This test opens a window and loads an insecure stylesheet.  We should trigger a
23 mixed content block because the main frame in the window has CSP directive block-all-mixed-content.</p>
24 <pre id="console"></pre>
25 <script>
26     window.open("https://127.0.0.1:8443/security/contentSecurityPolicy/block-all-mixed-content/resources/frame-with-insecure-css.html");
27 </script>
28 </body>
29 </html>