зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1630192 - Wait for the page to load before attempting to retrieve element. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D72506
This commit is contained in:
Родитель
55ff537cae
Коммит
07d72f57f6
|
@ -5,7 +5,6 @@
|
|||
"use strict";
|
||||
|
||||
var initialLocation = gBrowser.currentURI.spec;
|
||||
var newTab = null;
|
||||
|
||||
add_task(async function() {
|
||||
CustomizableUI.addWidgetToArea(
|
||||
|
@ -23,10 +22,14 @@ add_task(async function() {
|
|||
ok(addonsButton, "Add-ons button exists in Panel Menu");
|
||||
addonsButton.click();
|
||||
|
||||
newTab = gBrowser.selectedTab;
|
||||
await TestUtils.waitForCondition(
|
||||
() => gBrowser.currentURI && gBrowser.currentURI.spec == "about:addons"
|
||||
);
|
||||
await Promise.all([
|
||||
TestUtils.waitForCondition(
|
||||
() => gBrowser.currentURI && gBrowser.currentURI.spec == "about:addons"
|
||||
),
|
||||
new Promise(r =>
|
||||
gBrowser.selectedBrowser.addEventListener("load", r, true)
|
||||
),
|
||||
]);
|
||||
|
||||
let addonsPage = gBrowser.selectedBrowser.contentWindow.document.getElementById(
|
||||
"addons-page"
|
||||
|
|
Загрузка…
Ссылка в новой задаче