Bug 1708697 - Make sure a scroll event was fired in the same manner as we did for a mousemove event in the previous commit. r=tnikkel

Depends on D129364

Differential Revision: https://phabricator.services.mozilla.com/D129365
This commit is contained in:
Hiroyuki Ikezoe 2021-10-25 09:08:09 +00:00
Родитель dd5dc888d7
Коммит f44e6b0412
1 изменённых файлов: 9 добавлений и 16 удалений

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

@ -83,6 +83,14 @@ add_task(async () => {
}, },
{ once: true } { once: true }
); );
window.addEventListener(
"scroll",
() => {
dump("Got a scroll event in the popup content document\n");
browser.test.sendMessage("received-scroll");
},
{ once: true }
);
}, },
}, },
}); });
@ -140,22 +148,7 @@ add_task(async () => {
await Promise.all([nativeMouseEventPromise, mousemoveEventPromise]); await Promise.all([nativeMouseEventPromise, mousemoveEventPromise]);
const scrollEventPromise = SpecialPowers.spawn( const scrollEventPromise = extension.awaitMessage("received-scroll");
browserForPopup,
[],
async () => {
return new Promise(resolve => {
content.window.addEventListener(
"scroll",
event => {
dump("Got a scroll event in the popup content document\n");
resolve();
},
{ once: true }
);
});
}
);
// Start autoscrolling. // Start autoscrolling.
ok( ok(