blob: 2564b60e0b4196f40d83fa79b6ee926bfd895e56 [file] [log] [blame]
<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();
testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
}
log("open page-1");
window.open("resources/cached-page-1.html");
}
</script>
<body onload="test()">
<p>This test uses testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1); to enable
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>