Bug 1058797 - Intermittent test_303567.xul | Result logged after SimpleTest.finish(). r=mak, a=test-only
authorMartijn Wargers <mwargers@mozilla.com>
Thu, 04 Sep 2014 16:21:24 +0200
changeset 216691 d2d97af8ecdd
parent 216690 eee93220473c
child 216692 320e081cac62
push id3879
push userryanvm@gmail.com
push date2014-09-09 23:54 +0000
treeherdermozilla-beta@320e081cac62 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak, test-only
bugs1058797
milestone33.0
Bug 1058797 - Intermittent test_303567.xul | Result logged after SimpleTest.finish(). r=mak, a=test-only
toolkit/components/places/tests/chrome/test_303567.xul
--- a/toolkit/components/places/tests/chrome/test_303567.xul
+++ b/toolkit/components/places/tests/chrome/test_303567.xul
@@ -63,29 +63,29 @@ function runTest()
           is (aLivemark.siteURI.spec, aLivemarkData.siteURI.spec,
               "Get correct siteURI");
         }
         else {
           is (aLivemark.siteURI, null, "Get correct siteURI");
         }
 
         waitForLivemarkLoad(aLivemark, function (aLivemark) {
+          aLivemarkData.loaded = true;
           let nodes = aLivemark.getNodesForContainer({});
           is(nodes.length, aLivemarkData.urls.length,
              "Ensure all the livemark items were created.");
           aLivemarkData.urls.forEach(function (aUrl, aIndex) {
             let node = nodes[aIndex];
             is(node.uri, aUrl, aLivemarkData.message);
           });
 
           PlacesUtils.bookmarks.removeItem(aLivemark.id);
 
-          if (aLivemark.feedURI.equals(LIVEMARKS[LIVEMARKS.length - 1].feedURI)) {
+          if (LIVEMARKS.every(lm => lm.loaded))
             SimpleTest.finish();
-          }          
         });
       }, function () {
         is(true, false, "Should not fail adding a livemark");
       }
     );
   }
 
   LIVEMARKS.forEach(testLivemark);