Bug 1692708 - Await promiseApzFlushedRepaints() before calling window.scrollTo(). r=tnikkel

This is the way what other similar tests do (e.g.
helper_zoomToFocusedInput_multiline.html [1] and
helper_zoomToFocusedInput_scroll.html [2]).


[1] https://searchfox.org/mozilla-central/rev/126f016b59513988fae56c2b3f69c1cd23fe6ca1/gfx/layers/apz/test/mochitest/helper_zoomToFocusedInput_multiline.html#35-36
[2] https://searchfox.org/mozilla-central/rev/126f016b59513988fae56c2b3f69c1cd23fe6ca1/gfx/layers/apz/test/mochitest/helper_zoomToFocusedInput_scroll.html#33-34

Differential Revision: https://phabricator.services.mozilla.com/D129590
This commit is contained in:
Hiroyuki Ikezoe 2021-11-12 07:54:16 +00:00
parent 2c2f8ab1c6
commit 4dbf08ba04

View File

@ -44,6 +44,7 @@ async function test() {
let prevPosY = window.scrollY;
await transformEndPromise;
await promiseApzFlushedRepaints();
window.scrollTo(0, 0);
await waitToClearOutAnyPotentialScrolls(win);