Bug 1622743 - Replace BrowserTestUtils.waitForCondition with TestUtils.waitForCondition in browser_popup_frames.js r=prathiksha
authorSydney <jacksonsd@g.cofc.edu>
Tue, 24 Mar 2020 22:13:58 +0000
changeset 520300 bc93abf8ec1765d9d8d06f86812d7c4879ee38ba
parent 520299 86555508bdba0ca56663ca9b6ec92079cf06ac21
child 520301 d9b2acdce930ee1279fd8e51a4b8f85c5350435d
push id37246
push useropoprus@mozilla.com
push dateWed, 25 Mar 2020 03:40:33 +0000
treeherdermozilla-central@14b59d4adc95 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersprathiksha
bugs1622743
milestone76.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 1622743 - Replace BrowserTestUtils.waitForCondition with TestUtils.waitForCondition in browser_popup_frames.js r=prathiksha Differential Revision: https://phabricator.services.mozilla.com/D68058
browser/base/content/test/popups/browser_popup_frames.js
--- a/browser/base/content/test/popups/browser_popup_frames.js
+++ b/browser/base/content/test/popups/browser_popup_frames.js
@@ -28,17 +28,17 @@ add_task(async function test_opening_blo
       iframe.src = uri;
       content.document.body.appendChild(iframe);
       return iframe.browsingContext;
     }
   );
 
   // Wait for the popup-blocked notification.
   let notification;
-  await BrowserTestUtils.waitForCondition(
+  await TestUtils.waitForCondition(
     () =>
       (notification = gBrowser
         .getNotificationBox()
         .getNotificationWithValue("popup-blocked")),
     "Waiting for the popup-blocked notification."
   );
 
   ok(notification, "Should have notification.");
@@ -65,17 +65,17 @@ add_task(async function test_opening_blo
     "pagehide",
     true
   );
   // Now navigate the subframe.
   await SpecialPowers.spawn(popupframeBC, [], async function() {
     content.document.location.href = "about:blank";
   });
   await pageHideHappened;
-  await BrowserTestUtils.waitForCondition(
+  await TestUtils.waitForCondition(
     () =>
       !gBrowser.getNotificationBox().getNotificationWithValue("popup-blocked"),
     "Notification should go away"
   );
   ok(
     !gBrowser.getNotificationBox().getNotificationWithValue("popup-blocked"),
     "Should no longer have notification"
   );
@@ -89,30 +89,30 @@ add_task(async function test_opening_blo
       let iframe = content.document.createElement("iframe");
       iframe.id = "popupframe";
       iframe.src = uri;
       content.document.body.appendChild(iframe);
     }
   );
 
   // Wait for the popup-blocked notification.
-  await BrowserTestUtils.waitForCondition(
+  await TestUtils.waitForCondition(
     () =>
       (notification = gBrowser
         .getNotificationBox()
         .getNotificationWithValue("popup-blocked"))
   );
 
   ok(notification, "Should have notification.");
 
   await SpecialPowers.spawn(tab.linkedBrowser, [], () => {
     content.document.getElementById("popupframe").remove();
   });
 
-  await BrowserTestUtils.waitForCondition(
+  await TestUtils.waitForCondition(
     () =>
       !gBrowser.getNotificationBox().getNotificationWithValue("popup-blocked")
   );
   ok(
     !gBrowser.getNotificationBox().getNotificationWithValue("popup-blocked"),
     "Should no longer have notification"
   );