WebCore has quite nondeterministic behavior. I synthesize wheel events until the test passes, and that makes the test pass almost all the time for me, but it times out on the bots. This should be investigated, and doing so might lead to making scrolling more reliable.
Test originally added in https://trac.webkit.org/changeset/221164/webkit