Bug 1784772 - Forcibly flush scroll position change. r=botond

The lack of the flush is one of the causes of the test timeouts. Without the
flush, the content in question is not overscrollable, thus a swipe gesture
triggers a navigation back to the previous content rather than overscrolling.

Differential Revision: https://phabricator.services.mozilla.com/D172170
This commit is contained in:
Hiroyuki Ikezoe 2023-03-10 04:00:07 +00:00
Родитель 9d17af1369
Коммит 639a2d2d9f
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -1096,6 +1096,7 @@ add_task(async () => {
// overscrollable.
await SpecialPowers.spawn(tab.linkedBrowser, [], async () => {
content.document.documentElement.scrollLeft = 1;
content.document.documentElement.getBoundingClientRect();
await content.wrappedJSObject.promiseApzFlushedRepaints();
});