blob: 2c485fb1b9a64c6f6314543bc033595a63383d96 [file] [log] [blame]
<!DOCTYPE html> <!-- webkit-test-runner [ AsyncOverflowScrollingEnabled=true ] -->
<html>
<head>
<style>
body {
height: 2000px;
}
.scale0 {
width: 100px;
height: 100px;
border: 1px solid black;
transform: scaleX(0);
}
.scroller {
width: 200px;
height: 200px;
overflow-y: scroll;
border: 1px solid black;
}
.contents {
height: 300%;
}
</style>
<script src="../../../resources/js-test-pre.js"></script>
<script src="../../../resources/ui-helper.js"></script>
<script>
var jsTestIsAsync = true;
var scroller;
var overflowScrollEventCount = 0;
var windowScrollEventCount = 0;
async function scrollTest()
{
debug('');
debug('Test scroll over content');
await UIHelper.mouseWheelScrollAt(20, 20);
shouldBe('overflowScrollEventCount', '0');
shouldBe('windowScrollEventCount > 0', 'true');
finishJSTest();
}
window.addEventListener('load', () => {
scroller = document.querySelector('.scroller');
scroller.addEventListener('scroll', () => {
++overflowScrollEventCount;
}, false);
window.addEventListener('scroll', () => {
++windowScrollEventCount;
}, false);
setTimeout(scrollTest, 0);
}, false);
</script>
</head>
<body>
<div class="scale0">
<div class="scroller">
<div class="contents"></div>
</div>
</div>
<div id="console"></div>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>