Bug 1530801 - Replace waitForCondition in browser_947914_button_addons.js withTestUtils.waitForCondition r=johannh
authorMellina Yonashiro <yonashiro.mellina@gmail.com>
Mon, 04 Mar 2019 21:36:02 +0000
changeset 520210 c6d34d35ff2e0260924c8d870aef76cea034f487
parent 520209 07c49703b70c4cd01985771942e84aa37a66663c
child 520211 28d928686e97f9d194b7794505d1a48008572e57
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjohannh
bugs1530801
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1530801 - Replace waitForCondition in browser_947914_button_addons.js withTestUtils.waitForCondition r=johannh waitForCondition usage in the browser_947914_button_addons.js test file can be replaced by the TestUtils.waitForCondition utility function. > The function was replaced. There was only one occurance in this file (browser_947914_button_addons.js), but may exists in other ones. Differential Revision: https://phabricator.services.mozilla.com/D21720
browser/components/customizableui/test/browser_947914_button_addons.js
--- a/browser/components/customizableui/test/browser_947914_button_addons.js
+++ b/browser/components/customizableui/test/browser_947914_button_addons.js
@@ -16,18 +16,18 @@ add_task(async function() {
   await document.getElementById("nav-bar").overflowable.show();
   info("Menu panel was opened");
 
   let addonsButton = document.getElementById("add-ons-button");
   ok(addonsButton, "Add-ons button exists in Panel Menu");
   addonsButton.click();
 
   newTab = gBrowser.selectedTab;
-  await waitForCondition(() => gBrowser.currentURI &&
-                               gBrowser.currentURI.spec == "about:addons");
+  await TestUtils.waitForCondition(() => gBrowser.currentURI &&
+                                         gBrowser.currentURI.spec == "about:addons");
 
   let addonsPage = gBrowser.selectedBrowser.contentWindow.document.
                             getElementById("addons-page");
   ok(addonsPage, "Add-ons page was opened");
 });
 
 add_task(async function asyncCleanup() {
   CustomizableUI.reset();