blob: b68c6405ed64587aa7a815d3a569289a38302c3e [file] [log] [blame]
<!-- webkit-test-runner [ UsesBackForwardCache=true ] -->
<head>
<style>
html {
font-size: 32pt;
}
</style>
<script src="resources/swipe-test.js"></script>
<script>
history.scrollRestoration = "manual";
function didBeginSwipeCallback()
{
log("didBeginSwipe");
completeSwipeGesture();
}
function didEndSwipeCallback()
{
log("didEndSwipe");
startMeasuringDuration("snapshotRemoval");
}
function didRemoveSwipeSnapshotCallback()
{
log("didRemoveSwipeSnapshot");
measuredDurationShouldBeLessThan("snapshotRemoval", 1000, "Because we're using the page cache, it shouldn't be long between the gesture completing and the snapshot being removed.")
testComplete();
}
window.onload = function () {
if (!window.eventSender || !window.testRunner) {
document.body.innerHTML = "This test must be run in WebKitTestRunner.";
return;
}
initializeSwipeTest();
testRunner.installDidBeginSwipeCallback(didBeginSwipeCallback);
testRunner.installDidEndSwipeCallback(didEndSwipeCallback);
testRunner.installDidRemoveSwipeSnapshotCallback(didRemoveSwipeSnapshotCallback);
testRunner.dumpAsText();
testRunner.waitUntilDone();
setTimeout(function () {
history.pushState({page: "second"}, "second", "?second");
document.body.innerHTML = "second";
startSwipeGesture();
}, 0);
};
</script>
</head>
<body>
first
</body>