Bug 1530182 - Replaced promiseWaitForCondition with TestUtils.waitForCondition in browser_minimize.js. r=johannh
authorneha <ns19041997@gmail.com>
Mon, 25 Feb 2019 19:06:40 +0000
changeset 460961 69598c5631cecd60154f9595a8a207e1e03c7d06
parent 460960 22436d124e3a4025a0a1497572bc741dfc8350fe
child 460962 9afd71742756ebb5a6c66b592aef96624c2972f8
push id35613
push usernerli@mozilla.com
push dateTue, 26 Feb 2019 03:52:35 +0000
treeherdermozilla-central@faec87a80ed1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjohannh
bugs1530182
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 1530182 - Replaced promiseWaitForCondition with TestUtils.waitForCondition in browser_minimize.js. r=johannh Replaced promiseWaitForCondition with TestUtils.waitForCondition. Replaced all occurences of promiseWaitForCondition with TstUtils.waitForCondition, in mozilla-central/browser/base/content/test/general/browser_minimize.js Differential Revision: https://phabricator.services.mozilla.com/D21036
browser/base/content/test/general/browser_minimize.js
--- a/browser/base/content/test/general/browser_minimize.js
+++ b/browser/base/content/test/general/browser_minimize.js
@@ -2,17 +2,17 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 add_task(async function() {
     registerCleanupFunction(function() {
       window.restore();
     });
     function waitForActive() { return gBrowser.selectedTab.linkedBrowser.docShellIsActive; }
     function waitForInactive() { return !gBrowser.selectedTab.linkedBrowser.docShellIsActive; }
-    await promiseWaitForCondition(waitForActive);
+    await TestUtils.waitForCondition(waitForActive);
     is(gBrowser.selectedTab.linkedBrowser.docShellIsActive, true, "Docshell should be active");
     window.minimize();
-    await promiseWaitForCondition(waitForInactive);
+    await TestUtils.waitForCondition(waitForInactive);
     is(gBrowser.selectedTab.linkedBrowser.docShellIsActive, false, "Docshell should be Inactive");
     window.restore();
-    await promiseWaitForCondition(waitForActive);
+    await TestUtils.waitForCondition(waitForActive);
     is(gBrowser.selectedTab.linkedBrowser.docShellIsActive, true, "Docshell should be active again");
 });