blob: e9c164158983b2321bdebe288e8a9aaca5453562 [file] [log] [blame]
<html>
<head>
<title>Multiple Back/Forward Entries</title>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.dumpBackForwardList();
testRunner.waitUntilDone();
}
function loadDone() {
if (window.testRunner)
testRunner.notifyDone();
}
</script>
</head>
<body>
This test creates an iFrame via document.write(), then immediately changes the source of that iframe while the main document is still being parsed. It then navigates the frame again. The first src change should not result in a new back/forward list entry, but the second should.<br>
<script>
function firstLoadDone() {
document.getElementById('frame').onload = loadDone;
// Give the previous document an event loop iteration to commit.
setTimeout(function() {
document.getElementById('frame').src = "http://127.0.0.1:8000/navigation/resources/blank.txt";
});
}
document.write('<iframe id="frame" src="http://127.0.0.1:8000/navigation/resources/slow-resource.pl?delay=250" width="500" height="500"></iframe>');
document.getElementById('frame').src = "http://127.0.0.1:8000/navigation/resources/slow-resource.pl?delay=250";
document.getElementById('frame').onload = firstLoadDone;
</script>
</body>
</html>