blob: b3beefd7048c6bb6e3f4f917387dd9df32717fed [file] [log] [blame]
<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true internal:AsyncOverflowScrollingEnabled=true internal:AsyncFrameScrollingEnabled=true ] -->
<html>
<head>
<meta name="viewport" content="initial-scale=1.0">
<style>
.scroller {
margin: 10px;
height: 300px;
width: 300px;
border: 1px solid black;
overflow: scroll;
will-change: transform;
}
.fixed {
position: fixed;
top: 0px;
width: 200px;
height: 200px;
background-color: green;
}
.container {
top: 0px;
margin: 40px;
border: 2px solid red;
width: 200px;
height: 5000px;
position: absolute;
will-change: transform;
}
.spacer {
height: 1000px;
border: 2px solid blue;
}
</style>
<script src="../../resources/ui-helper.js"></script>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
async function doTest()
{
if (!window.testRunner)
return;
if (!testRunner.runUIScript)
return;
await UIHelper.ensurePresentationUpdate();
document.querySelector('.scroller').scrollTo(0, 200);
await UIHelper.ensurePresentationUpdate();
testRunner.notifyDone();
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<div class="scroller">
<div class="container">
<div class="fixed"></div>
</div>
<div class="spacer"></div>
</div>
</body>
</html>