blob: a023bca91d3f125bfe50d605381a154c1f68ab95 [file] [log] [blame]
<!-- webkit-test-runner [ enablePageCache=true ] -->
<html>
<script>
window.finish = function()
{
if (testRunner)
testRunner.notifyDone();
}
window.log = function(message) {
document.getElementById("result").innerHTML += message + "<br>";
}
window.failure = function(message) {
log("FAIL: " + message);
finish();
}
var onloadReportCount = 0;
window.reportOnload = function() {
if (++onloadReportCount > 1)
failure("Multiple onload calls on page-1.");
}
function test()
{
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.setCanOpenWindows();
}
log("open page-1");
window.open("resources/cached-page-1.html");
}
</script>
<body onload="test()">
<p>This test enables
back-forward WebKit page cache for the duration of the test.
The test enables cache, navigates to page-1, then to page-2 and then does history.back() to page-1.
On navigation back to page-1, test verifies that previously-initialized timer continues to fire and
onload is not called again.
If test fails it hangs or outputs 'FAIL' below.
<div id="result"></div>
</body>
</html>