blob: 94cff7aa9f5dfc495285910fbddf41f4608941af [file] [log] [blame]
<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
<script>
window.onpageshow = function(evt) {
if (!window.testRunner)
return;
if (!evt.persisted)
return;
setTimeout("testRunner.notifyDone()", 0);
}
function clickLinkToSlowPage() {
var link = document.getElementById("linkToSlowPage");
var linkRect = link.getClientRects()[0];
var targetX = linkRect.left + linkRect.width / 2;
var targetY = linkRect.top + linkRect.height / 2;
eventSender.mouseMoveTo(targetX, targetY);
eventSender.mouseDown();
eventSender.mouseUp();
}
window.onload = function(evt) {
setTimeout("clickLinkToSlowPage()", 0);
}
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
} else
document.write('This test must be run by WebKitTestRunner!');
</script>
This test dumps frame load callbacks. It is only useful inside of WebKitTestRunner.<br><br>
<a id="linkToSlowPage" href="resources/page-with-slow-loading-subresource.html">This link goes to a page with a slow loading subresource.</a>
Bug <a href="https://bugs.webkit.org/show_bug.cgi?id=119416">119416 - Going "back" to a cached page from a page with outstanding subresource loads breaks scrolling, amongst other issues.</a><br><br>
In the broken case, the second page gets a didFinishLoad callback intertwined with the restoration of the cached page, even though it's already gotten a didFailLoad callback.<br>
The final 4 callbacks look like:<br>
didFailLoadWithError<br>
didStartProvisionalLoadForFrame<br>
didFinishLoadForFrame<br>
didCommitLoadForFrame<br><br>
When fixed, the final 4 callbacks should be:<br>
didFailLoadWithError<br>
didStartProvisionalLoadForFrame<br>
didCommitLoadForFrame<br>
didFinishLoadForFrame<br>