blob: 51f2495e8df2c9b7f0673bba6a8cabe2d5bd31df [file] [log] [blame]
<!-- webkit-test-runner [ enableBackForwardCache=true ] -->
<!DOCTYPE html>
<html>
<body>
<script src="/resources/js-test-pre.js"></script>
<script>
description("A frame without current history item should not prevent page caching.");
window.jsTestIsAsync = true;
window.addEventListener("pageshow", function(event) {
debug("pageshow - " + (event.persisted ? "" : "not ") + "from cache");
if (event.persisted) {
testPassed("Page did enter and was restored from the page cache");
finishJSTest();
}
}, false);
window.addEventListener("pagehide", function(event) {
debug("pagehide - " + (event.persisted ? "" : "not ") + "entering cache");
if (!event.persisted) {
testFailed("Page did not enter the page cache.");
finishJSTest();
}
}, false);
window.addEventListener('load', function() {
setTimeout(function() {
// Force a back navigation back to this page.
window.location.href = "resources/page-cache-helper.html";
}, 0);
}, false);
</script>
<iframe src="http://"></iframe>
<script src="/resources/js-test-post.js"></script>
</body>
</html>