Bug 1708697 - Setup a scroll event listener before triggering an autoscroll operation. r=tnikkel

Depends on D128953

Differential Revision: https://phabricator.services.mozilla.com/D128954
This commit is contained in:
Hiroyuki Ikezoe 2021-10-19 22:42:15 +00:00
parent 6fb642f75a
commit 5d773fb0b0

View File

@ -115,16 +115,6 @@ add_task(async () => {
}
);
// Start autoscrolling.
ok(
browserForPopup.browsingContext.startApzAutoscroll(
screenX + 100,
screenY + 50,
viewId,
presShellId
)
);
const scrollEventPromise = SpecialPowers.spawn(
browserForPopup,
[],
@ -142,6 +132,16 @@ add_task(async () => {
}
);
// Start autoscrolling.
ok(
browserForPopup.browsingContext.startApzAutoscroll(
screenX + 100,
screenY + 50,
viewId,
presShellId
)
);
// Send sequential mousemove events to cause autoscrolling.
for (let i = 0; i < 10; i++) {
await promiseNativeMouseEventWithAPZ({