| <!DOCTYPE html> |
| <html> |
| <head> |
| <meta http-equiv="Content-Security-Policy" content="frame-src 'none'; script-src 'unsafe-inline'"> |
| <script> |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| </script> |
| </head> |
| <body> |
| <p>Tests that a HTML iframe element, in a user agent shadow tree, is allowed to load when the page has CSP policy: <code>frame-src 'none'</code>. This test FAILED if it timesout.</p> |
| <div id="shadow-host"></div> |
| <script> |
| function runTest() |
| { |
| if (!window.testRunner || !window.internals) |
| return; |
| |
| var userAgentShadowRoot = internals.ensureUserAgentShadowRoot(document.getElementById("shadow-host")); |
| var iframe = document.createElement("iframe"); |
| userAgentShadowRoot.appendChild(iframe); |
| |
| iframe.onload = function () { |
| alert("PASS iframe did load."); |
| // The content document of the HTML iframe will call testRunner.notifyDone(). |
| } |
| iframe.src = "http://127.0.0.1:8000/resources/notify-done.html"; |
| } |
| |
| runTest(); |
| </script> |
| </body> |
| </html> |