| <!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> |