blob: ef5ef437dd1fde43a95ec20c08ac74ffeb7b4f1b [file] [log] [blame]
<!-- webkit-test-runner [ UsesBackForwardCache=true ] -->
<!DOCTYPE html>
<html>
<body>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
t = async_test();
window.addEventListener("pageshow", function(event) {
if (event.persisted)
t.done();
});
window.addEventListener("pagehide", t.step_func((event) => {
if (!event.persisted)
assert_uneached("Page failed to enter page cache");
}));
onload = () => {
setTimeout(async () => {
const pc = new RTCPeerConnection();
const channel = pc.createDataChannel("test");
const offer = await pc.createOffer();
await pc.setLocalDescription(offer);
window.location = "../../fast/history/resources/page-cache-helper.html";
}, 0);
};
</script>
</html>