forked from mirrors/gecko-dev
Bug 1803992 - Call BrowserTestUtils.waitForContentEvent before awaiting "apz-repaints-flushed" in content. r=botond
It will ensure that the BrowserTestUtils.waitForContentEvent has finished setting up the event listener in content before sending native pan events. Differential Revision: https://phabricator.services.mozilla.com/D165344
This commit is contained in:
parent
a798663417
commit
79ff9afbce
1 changed files with 5 additions and 5 deletions
|
|
@ -36,16 +36,16 @@ add_task(async () => {
|
|||
URL_ROOT + "helper_content_response_timeout.html"
|
||||
);
|
||||
|
||||
await SpecialPowers.spawn(tab.linkedBrowser, [], async () => {
|
||||
await content.wrappedJSObject.promiseApzFlushedRepaints();
|
||||
await content.wrappedJSObject.waitUntilApzStable();
|
||||
});
|
||||
|
||||
let scrollPromise = BrowserTestUtils.waitForContentEvent(
|
||||
tab.linkedBrowser,
|
||||
"scroll"
|
||||
);
|
||||
|
||||
await SpecialPowers.spawn(tab.linkedBrowser, [], async () => {
|
||||
await content.wrappedJSObject.promiseApzFlushedRepaints();
|
||||
await content.wrappedJSObject.waitUntilApzStable();
|
||||
});
|
||||
|
||||
// Note that below function uses `WaitForObserver` version of sending a
|
||||
// pan-start event function so that the notification can be sent in the parent
|
||||
// process, thus we can get the notification even if the content process is
|
||||
|
|
|
|||
Loading…
Reference in a new issue