mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
8cf567376b
Waiting for 50ms and checking if the scrollTop has changed does not necessarily mean that the scrolling has stopped (or even started). It might also mean that a GC has blocked the autoscroll interval from running and the scrolling will happen in a few moments. If the view hasn't even started to scroll, the assertion that the view has scrolled fails. If the view has started to scroll, the next call to waitForViewScroll() might resolve when before the direction of the scrolling is reversed causing the assertions that the direction has changed to fail. Instead of relying on intervals to detect if scrolling has stopped, the test could wait for a certain number of frames during which the view has not scrolled to determine if the scrolling has ended. This method has successfully been used in layout/base/tests/test_scroll_snapping.html to detect when scrolling has stopped. These changes make browser_markupview_dragdrop_autoscroll.js to use the previously presented method to detect the end of markup-view autoscroll. The code used in the layout test has been included in the test and modified to yield and use promises when waiting for a frame. |
||
---|---|---|
.. | ||
client | ||
server | ||
shared | ||
.eslintignore | ||
.eslintrc | ||
.eslintrc.mochitests | ||
.eslintrc.xpcshell | ||
moz.build | ||
templates.mozbuild |