Part 10: Bug 1700623 - Wait for history navigation in browser_history_menu.js r=peterv

Differential Revision: https://phabricator.services.mozilla.com/D115898
This commit is contained in:
Andreas Farre 2021-05-26 07:14:07 +00:00
Родитель 3dd66dc912
Коммит 71ed674415
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -25,7 +25,11 @@ async function testBackForwardMenu(useContextMenu) {
iterChild
) {
if (iterChild == 4) {
let popStatePromise = new Promise(function(resolve) {
content.onpopstate = resolve;
});
content.history.back();
await popStatePromise;
} else {
content.history.pushState({}, "" + iterChild, iterChild + ".html");
}