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