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 217813 d2d97af8ecdde35d6dd57c01be50b19a75a65e8b
parent 217812 eee93220473c96cdacb225f7170dd18317f74da1
child 217814 320e081cac62ffe05ddbef26ef889dfc9dc8c05e
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [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);