blob: fd62bd3828666a876b0dee1cb4a5d322ada777fb [file] [log] [blame]
<!-- webkit-test-runner [ enablePageCache=true ] -->
<!DOCTYPE html>
<html>
<body>
<script src="../../../resources/js-test-pre.js"></script>
<iframe src="about:blank"></iframe>
<script>
window.addEventListener("pageshow", function(event) {
debug("pageshow - " + (event.persisted ? "" : "not ") + "from cache");
if (!window.sessionStorage.page_cache_window_iframe_removed_test_started)
return;
delete window.sessionStorage.page_cache_window_iframe_removed_test_started;
setTimeout(function() {
window.opener.finishJSTest();
}, 0);
}, false);
window.addEventListener("pagehide", function(event) {
debug("pagehide - " + (event.persisted ? "" : "not ") + "entering cache");
}, false);
window.addEventListener('load', function() {
setTimeout(function() {
window.opener.removeFrameInChild();
// Force a back navigation back to this page.
window.sessionStorage.page_cache_window_iframe_removed_test_started = true;
window.location.href = "page-cache-helper.html";
}, 0);
}, false);
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>