CC[1] and Blink [2] both provide flags to disable scroll animation (e.g., smooth scrolling for non-precise wheel) in tests. This is helpful in avoiding potential delay and flakiness that animation may introduce when the animation behavior is not relevant in tests.
However, at the moment layout tests can only disable Blink scroll animations via internals.settings.setScrollAnimatorEnabled. So any
layout test that tries to check the threaded scrolling path has to
deal with animations. See for example [3].
Here are few potential solutions:
1) Wire up the internals.settings to actually disable scrolling in cc as well
2) Add a callback for "scroll animation end" in test environments
3) Instead of disabling animations totally just make them take a
specific amount of time e.g., 1 frame so that we test animations
without waiting too long.
4) Just don't do anything, we rarely test threaded scrolling path
via layout test ....
I personally think #1 is reasonable and should be fairly quick to do.
[1] InputHandlerProxy::smooth_scroll_enabled_
[2] internals.settings.setScrollAnimatorEnabled
[3] https://codereview.chromium.org/2769793002/diff/600001/third_party/WebKit/LayoutTests/fast/scroll-behavior/scroll-boundary-behavior.html
Comment 1 by skobes@chromium.org
, Jul 17 2017