blob: 2d6414ce79703a72210137a6e3d06311d43030e0 [file] [log] [blame]
<!-- webkit-test-runner [ UsesBackForwardCache=true ] -->
<!DOCTYPE html>
<html>
<body>
<script src="../../resources/js-test.js"></script>
<script>
description("Tests that an IDBRequest does not prevent page caching.");
jsTestIsAsync = true;
window.addEventListener("pageshow", function(event) {
debug("pageshow - " + (event.persisted ? "" : "not ") + "from page cache");
if (event.persisted) {
testPassed("Page entered page cache");
finishJSTest();
}
});
window.addEventListener("pagehide", function(event) {
debug("pagehide - " + (event.persisted ? "" : "not ") + "entering page cache");
if (!event.persisted) {
testFailed("Page failed to enter page cache");
finishJSTest();
}
});
onload = () => {
setTimeout(() => {
request = indexedDB.open("MyTestDatabase");
window.location = "../../fast/history/resources/page-cache-helper.html";
}, 0);
};
</script>
</html>