blob: 2ec70181169551127834bbad56025eb8dea7bb7d [file] [edit]
<html>
<head>
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
testRunner.dumpChildFramesAsText();
}
async function navigate() {
if (window.eventSender) {
var a = document.getElementById("a");
await eventSender.asyncMouseMoveTo(a.offsetLeft + 2, a.offsetTop + 2);
await eventSender.asyncMouseDown();
await eventSender.asyncMouseUp();
}
}
function addChildFrame()
{
if (!window.sessionStorage.getItem("childFrame")) {
window.sessionStorage.childFrame = "true";
document.body.innerHTML += '<iframe onload=\'setTimeout(navigate, 0);\' src=\'resources/empty-subframe.html\'></iframe>';
return;
}
window.sessionStorage.removeItem("childFrame");
document.body.innerHTML += '<iframe src=\'resources/pass-and-notify-done.html\'></iframe>';
}
</script>
</head>
<body onload="setTimeout(addChildFrame, 0)" onunload="return false;">
<a id="a" href="resources/empty-document-goes-back.html">Go forward then back.</a>
</body>
</html>