Bug 1530279 - Replace promiseWaitForEvent in browser_tab_dragdrop2.js with BrowserTestUtils.waitForEvent. r=johannh
authorakshitha <akshithashetty84@gmail.com>
Wed, 27 Feb 2019 10:05:26 +0000
changeset 519321 e2bb36fb5eadbe96efb263ca1624343c043f7e71
parent 519320 d17134399e22a0a320abcd764518847270017bd1
child 519322 9527be2c6bcf17765a6b526c114b91ea338e20c7
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
bugs1530279
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 1530279 - Replace promiseWaitForEvent in browser_tab_dragdrop2.js with BrowserTestUtils.waitForEvent. r=johannh Replace promiseWaitForEvent in browser_tab_dragdrop2.js with BrowserTestUtils.waitForEvent Differential Revision: https://phabricator.services.mozilla.com/D21231
browser/base/content/test/general/browser_tab_dragdrop2.js
--- a/browser/base/content/test/general/browser_tab_dragdrop2.js
+++ b/browser/base/content/test/general/browser_tab_dragdrop2.js
@@ -16,17 +16,17 @@ add_task(async function() {
   await promiseTestsDone(win);
   ok(true, "tests succeeded");
 
   // Create a second tab so that we can move the original one out.
   BrowserTestUtils.addTab(win.gBrowser, "about:blank", {skipAnimation: true});
 
   // Tear off the original tab.
   let browser = win.gBrowser.selectedBrowser;
-  let tabClosed = promiseWaitForEvent(browser, "pagehide", true);
+  let tabClosed = BrowserTestUtils.waitForEvent(browser, "pagehide", true);
   let win2 = win.gBrowser.replaceTabWithWindow(win.gBrowser.tabs[0]);
 
   // Add a 'TestsDone' event listener to ensure that the docShells is properly
   // swapped to the new window instead of the page being loaded again. If this
   // works fine we should *NOT* see a TestsDone event.
   let onTestsDone = () => ok(false, "shouldn't run tests when tearing off");
   win2.addEventListener("TestsDone", onTestsDone);
 
@@ -47,14 +47,14 @@ add_task(async function() {
   ok(true, "tests succeeded a second time");
 
   // Cleanup.
   await promiseWindowClosed(win2);
   await promiseWindowClosed(win);
 });
 
 function promiseTestsDone(win) {
-  return promiseWaitForEvent(win, "TestsDone");
+  return BrowserTestUtils.waitForEvent(win, "TestsDone");
 }
 
 function promiseDelayedStartupFinished(win) {
   return new Promise(resolve => whenDelayedStartupFinished(win, resolve));
 }