blob: 08449addacb0520f0db4d5912f55f4e08320ff07 [file] [log] [blame]
<!DOCTYPE html><!-- webkit-test-runner [ JavaScriptCanOpenWindowsAutomatically=true ] -->
<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.waitUntilDone();
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>