| <!DOCTYPE html> |
| <html> |
| <head> |
| <meta charset="UTF-8"> |
| <title>Tests that windows created from a sandboxed context inherit the same sandbox</title> |
| <script src="../resources/js-test-pre.js"></script> |
| </head> |
| <body> |
| <script> |
| if (window.testRunner) { |
| testRunner.setCanOpenWindows(); |
| testRunner.waitUntilDone(); |
| testRunner.setPopupBlockingEnabled(false); |
| testRunner.dumpAsText(); |
| } |
| |
| function wrapUp () { |
| if (window.testRunner) { |
| testRunner.notifyDone(); |
| } |
| } |
| |
| function run() { |
| var iframeContentDocument = document.getElementById("theIframe").contentDocument, |
| theLink = iframeContentDocument.getElementById("theLink"), |
| clickEvent = document.createEvent("HTMLEvents"); |
| clickEvent.initEvent("click", true, true); |
| theLink.dispatchEvent(clickEvent); |
| |
| setTimeout(wrapUp, 500); |
| } |
| </script> |
| <iframe onload="run()" id="theIframe" sandbox="allow-same-origin allow-popups" src="resources/anchor-tag-with-blank-target.html"></iframe> |
| </body> |
| </html> |