blob: 494835b8bd64b21a9d6d160b32791a1ef3cf82b0 [file] [log] [blame]
<!-- webkit-test-runner [ enableBackForwardCache=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>