| |
| <!DOCTYPE html> |
| <html> |
| <head> |
| <style> |
| |
| body, html { |
| width: 100%; |
| height: 100%; |
| margin: 0; |
| } |
| |
| .snap { |
| width: 100%; |
| height: 100%; |
| } |
| |
| #extra-tall { |
| height: 150%; |
| } |
| |
| .output { |
| color: white; |
| position: fixed; |
| top: 0; |
| } |
| </style> |
| <script src="../../../resources/js-test.js"></script> |
| <script src="../../../resources/ui-helper.js"></script> |
| <script> |
| jsTestIsAsync = true; |
| var windowScrollendEventCount = 0; |
| |
| addEventListener("load", async () => { |
| if (!window.testRunner) |
| return; |
| window.addEventListener('scrollend', () => { |
| ++windowScrollendEventCount; |
| }, false); |
| |
| await UIHelper.statelessMouseWheelScrollAt(100, 100, 0, -1); |
| await UIHelper.statelessMouseWheelScrollAt(200, 200, 0, -1); |
| await UIHelper.ensurePresentationUpdate(); |
| setTimeout(function() { |
| shouldBe('windowScrollendEventCount', '1'); |
| finishJSTest(); |
| }, 100); |
| }); |
| </script> |
| </head> |
| <body> |
| <div class="snap" id="first-container" style="background: #80475E"></div> |
| <div class="snap" id="extra-tall" style="background: #CC5A71"></div> |
| <div class="snap" style="background: #32228B"></div> |
| <div class="output"> |
| <pre id="description"></pre> |
| <pre id="console"></pre> |
| </div> |
| </body> |
| </html> |