blob: 7d2dd38be5dac6a317d8184d6af374fd4a008ca0 [file] [log] [blame]
<!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>