Bug 916391 - Make testRemoveTab properly return a promise in browser_dbg_multiple-windows.js, r=me
authorVictor Porof <vporof@mozilla.com>
Sat, 14 Sep 2013 08:47:40 +0300
changeset 160085 d60477f4cb2061b03c7cb98196fc895d83699597
parent 160084 37452cc13fa16d4d1360ec01cfe3cbeabaaf1d0e
child 160086 4d44bc8da75c412dd2499cbee2df2969aff49f75
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs916391
milestone26.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 916391 - Make testRemoveTab properly return a promise in browser_dbg_multiple-windows.js, r=me
browser/devtools/debugger/test/browser_dbg_multiple-windows.js
--- a/browser/devtools/debugger/test/browser_dbg_multiple-windows.js
+++ b/browser/devtools/debugger/test/browser_dbg_multiple-windows.js
@@ -131,29 +131,35 @@ function testFocusFirst() {
   });
 
   window.content.focus();
 
   return deferred.promise;
 }
 
 function testRemoveTab() {
+  let deferred = promise.defer();
+
   gNewWindow.close();
   removeTab(gNewTab);
 
   gClient.listTabs(aResponse => {
     // Verify that tabs are no longer included in listTabs.
     let foundTab1 = aResponse.tabs.some(aGrip => aGrip.url == TAB1_URL);
     let foundTab2 = aResponse.tabs.some(aGrip => aGrip.url == TAB2_URL);
     ok(!foundTab1, "Tab1 should be gone.");
     ok(!foundTab2, "Tab2 should be gone.");
 
     is(aResponse.selected, 0,
       "The original tab is selected.");
+
+    deferred.resolve();
   });
+
+  return deferred.promise;
 }
 
 function closeConnection() {
   let deferred = promise.defer();
   gClient.close(deferred.resolve);
   return deferred.promise;
 }