blob: 4b367795f63cd9497870927c0faab6b8e2e35fb9 [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;
z-index: 0;
position: relative;
}
.sticky {
position: -webkit-sticky;
top: 0px;
width: 200px;
height: 200px;
background-color: green;
}
.fixed {
position: fixed;
top: 100px;
left: 100px;
width: 50px;
height: 50px;
background-color: blue;
}
.container {
margin: 40px;
border: 2px solid red;
height: 5000px;
}
</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;
const scrollUpdatesDisabled = true;
await UIHelper.immediateScrollElementAtContentPointToOffset(50, 50, 0, 200, scrollUpdatesDisabled);
testRunner.notifyDone();
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<div class="container">
<div class="sticky">
<div class="fixed">
</div>
</div>
</div>
</body>
</html>