blob: 2ec924a50b6e6dcba18aed212703ee82bbba9ba3 [file] [log] [blame]
<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true AsyncOverflowScrollingEnabled=true AsyncFrameScrollingEnabled=true ] -->
<html>
<head>
<meta name="viewport" content="initial-scale=1.0">
<style>
#scroller {
left: 100px;
margin: 10px;
height: 300px;
width: 300px;
border: 1px solid black;
overflow: scroll;
z-index: 0;
position: relative;
}
.box {
position: fixed;
margin-top: 200px;
width: 200px;
height: 200px;
background-color: green;
}
.spacer {
border: 2px solid blue;
height: 5000px;
}
</style>
<script src="../../resources/ui-helper.js"></script>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
async function doTest()
{
await UIHelper.ensurePresentationUpdate(); // Not sure why this is necessary, but it is.
window.scrollTo(0, 50);
await UIHelper.ensurePresentationUpdate();
if (window.testRunner)
testRunner.notifyDone();
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<div class="spacer">
<div id="scroller">
<div class="box"></div>
<div class="spacer"></div>
</div>
</div>
</body>
</html>