blob: b1ecd137a0ab787d863b813b31bce5671a095110 [file] [log] [blame]
<!DOCTYPE html>
<body style="overflow:hidden">
<div style="height:2000px;"></div>
<!-- Red div to indicate test failure -->
<div style="position: absolute; top: 250px; width: 200px; height: 100px; background-color: red;"></div>
<!-- Green fixed-position, composited div which covers the red div after we scroll -->
<div style="position: fixed; -webkit-transform: translateZ(0); top: 50px; width: 200px; height: 100px; background-color: green;"></div>
if (window.testRunner) {
onload = function() {
if (window.localStorage.stage == 'two') {
// We went foward and back again.
// If the scroll position is restored correctly the red div won't be visible.
delete window.localStorage.stage;
if (window.testRunner) {
} else {
window.localStorage.stage = 'two';
window.scrollTo(0, 200);
setTimeout(function() {
window.location.href = 'resources/fixed-position-scroll-offset-history-restore-2.html';
}, 0);