blob: 68947c564c6d3be3544d3c0101029b766e1358bc [file] [log] [blame]
<html>
<head>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
layoutTestController.setCanOpenWindows();
layoutTestController.setCloseRemainingWindowsWhenComplete(true);
}
</script>
</head>
<body>
<p>This test verifies that a sandboxed IFrame can close a top-level frame
with allow-top-navigation.</p>
<button onclick="start()">Start Test</button>
<script>
function start() {
window.wnd = window.open("resources/sandboxed-iframe-close-top-does-close.html");
}
function done() {
alert("PASS");
// We end the test asynchronously becaues this function is being called
// from a strange callstack.
window.setTimeout(function () {
if (window.layoutTestController)
layoutTestController.notifyDone();
}, 0);
}
// In LayoutTests mode we can start automagically.
start();
</script>
</body>
</html>