blob: 5004c90ec4119e5a8e3cd680b2603d817f7dacd6 [file] [log] [blame]
<html>
<head>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.setCanOpenWindows();
}
function log(msg) {
var div = document.createElement("div");
div.appendChild(document.createTextNode(msg));
document.getElementById("console").appendChild(div);
}
window.addEventListener("message", function(e) {
if (e.data == "ready") {
win.location = "resources/pass.html";
} else if (e.data == "pass") {
win.document.body.innerHTML = "Frame navigated back on-domain";
win.close();
log("PASS");
if (window.testRunner)
testRunner.notifyDone();
}
}, false);
window.onload = function() {
win = window.open("http://localhost:8000/security/frameNavigation/resources/ready.html", "targetFrame");
}
</script>
</head>
<body>
<div id="console"></div>
</body>
</html>