blob: f066ea5865aeab752f3347d40e8e7f05ef8e9cb7 [file] [edit]
<!DOCTYPE html> <!-- webkit-test-runner [ AsyncOverflowScrollingEnabled=true ] -->
<html>
<head>
<style>
:root {
overscroll-behavior: none;
}
body {
height: 4000px;
}
.iframe {
position: fixed;
width: 400px;
height: 400px;
}
.content {
width: 100%;
height: 4000px;
}
</style>
<script src="../../../resources/ui-helper.js"></script>
<script src="../../../resources/js-test-pre.js"></script>
<script>
jsTestIsAsync = true;
async function runTest()
{
document.querySelector('.iframe').scrollTop = 0;
await UIHelper.startMonitoringWheelEvents();
await UIHelper.mouseWheelScrollAt(50, 50, 0, -10);
await UIHelper.waitForScrollCompletion();
shouldBe('window.pageYOffset', '200');
finishJSTest();
}
window.addEventListener('load', () => {
setTimeout(runTest, 0);
}, false);
</script>
</head>
<body>
<iframe src="../resources/smooth-scroll-iframe-helper-iframe.html" class="iframe"></iframe>
<div id="console"></div>
<script src="../../../resources/js-test-post.js"></script>
</body>