blob: 01b0de18e7bbddfe3823d0731100d5e462383f29 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
body {
height: 2000px;
}
.outer {
background: blue;
margin-top: 120px;
height: 200px;
padding: 10px;
}
.sticky {
position: sticky;
position: -webkit-sticky;
top: 0px;
}
.inner {
padding: 10px;
background: orange;
top: 10px;
height: 80px;
}
</style>
<script src="../../resources/ui-helper.js"></script>
<script>
async function scrollTest()
{
const events = [
{
type : "wheel",
viewX : 20,
viewY : 20,
deltaY : -10,
phase : "began"
},
{
type : "wheel",
deltaY : -1000,
phase : "changed"
},
{
type : "wheel",
phase : "ended"
},
{
type : "wheel",
deltaY : -1000,
momentumPhase : "began"
},
{
type : "wheel",
deltaY : -1000,
momentumPhase : "changed"
},
{
type : "wheel",
momentumPhase : "ended"
}
];
await UIHelper.mouseWheelSequence({ events: events });
testRunner.notifyDone();
}
function startTest()
{
if (window.eventSender) {
testRunner.waitUntilDone();
setTimeout(scrollTest, 0);
}
}
window.addEventListener('load', startTest, false);
</script>
</head>
<body>
<div class="outer sticky">
<div class="inner sticky"></div>
</body>
</html>