зеркало из 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";
|
"use strict";
|
||||||
|
|
||||||
var initialLocation = gBrowser.currentURI.spec;
|
var initialLocation = gBrowser.currentURI.spec;
|
||||||
var newTab = null;
|
|
||||||
|
|
||||||
add_task(async function() {
|
add_task(async function() {
|
||||||
CustomizableUI.addWidgetToArea(
|
CustomizableUI.addWidgetToArea(
|
||||||
|
@ -23,10 +22,14 @@ add_task(async function() {
|
||||||
ok(addonsButton, "Add-ons button exists in Panel Menu");
|
ok(addonsButton, "Add-ons button exists in Panel Menu");
|
||||||
addonsButton.click();
|
addonsButton.click();
|
||||||
|
|
||||||
newTab = gBrowser.selectedTab;
|
await Promise.all([
|
||||||
await TestUtils.waitForCondition(
|
TestUtils.waitForCondition(
|
||||||
() => gBrowser.currentURI && gBrowser.currentURI.spec == "about:addons"
|
() => gBrowser.currentURI && gBrowser.currentURI.spec == "about:addons"
|
||||||
);
|
),
|
||||||
|
new Promise(r =>
|
||||||
|
gBrowser.selectedBrowser.addEventListener("load", r, true)
|
||||||
|
),
|
||||||
|
]);
|
||||||
|
|
||||||
let addonsPage = gBrowser.selectedBrowser.contentWindow.document.getElementById(
|
let addonsPage = gBrowser.selectedBrowser.contentWindow.document.getElementById(
|
||||||
"addons-page"
|
"addons-page"
|
||||||
|
|
Загрузка…
Ссылка в новой задаче