Bug 703174 - Make browser_drag_bookmarks_on_toolbar.js only call finish() once. r=mak
authorCameron McCormack <cam@mcc.id.au>
Fri, 18 Nov 2011 08:05:51 +1100
changeset 80388 c99d183ec8ab2e61d9643802d6af19aa669121d8
parent 80387 a7b658e309b90430572c7c36a4f1b37576b16ac1
child 80389 23b5adbc510867ee5a5afdee57c59a859d0ef229
push id3425
push usercmccormack@mozilla.com
push dateThu, 17 Nov 2011 21:06:31 +0000
treeherdermozilla-inbound@c99d183ec8ab [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs703174
milestone11.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 703174 - Make browser_drag_bookmarks_on_toolbar.js only call finish() once. r=mak
browser/components/places/tests/browser/browser_drag_bookmarks_on_toolbar.js
--- a/browser/components/places/tests/browser/browser_drag_bookmarks_on_toolbar.js
+++ b/browser/components/places/tests/browser/browser_drag_bookmarks_on_toolbar.js
@@ -255,20 +255,20 @@ var gTests = [
         });
     }
   },
 ];
 
 function nextTest() {
   if (gTests.length) {
     var test = gTests.shift();
-    info("Start of test: " + test.desc);
-    test.run();
-
-    waitForFocus(nextTest);
+    waitForFocus(function() {
+      info("Start of test: " + test.desc);
+      test.run();
+    });
   }
   else {
     // Collapse the personal toolbar if needed.
     if (wasCollapsed)
       setToolbarVisibility(toolbar, false);
     finish();
   }
 }
@@ -278,11 +278,11 @@ let wasCollapsed = toolbar.collapsed;
 
 function test() {
   waitForExplicitFinish();
 
   // Uncollapse the personal toolbar if needed.
   if (wasCollapsed)
     setToolbarVisibility(toolbar, true);
 
-  waitForFocus(nextTest);
+  nextTest();
 }