Bug 941587 - Intermittent TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/components/satchel/test/browser/browser_privbrowsing_perwindowpb.js. r=ehsan, a=test-only
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Wed, 11 Dec 2013 16:41:46 +0200
changeset 148731 1d79900d1213ac3f39fc603e29934ab270a34115
parent 148730 976801762cff27dd577d560052497d94fbccfd22
child 148732 378e7caddef233d0b0ca58712ce27e1e103af64a
push id111
push userryanvm@gmail.com
push dateThu, 12 Dec 2013 15:50:42 +0000
reviewersehsan, test-only
bugs941587
milestone24.2.0
Bug 941587 - Intermittent TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/components/satchel/test/browser/browser_privbrowsing_perwindowpb.js. r=ehsan, a=test-only
toolkit/components/satchel/test/browser/browser_privbrowsing_perwindowpb.js
--- a/toolkit/components/satchel/test/browser/browser_privbrowsing_perwindowpb.js
+++ b/toolkit/components/satchel/test/browser/browser_privbrowsing_perwindowpb.js
@@ -9,16 +9,20 @@ function test() {
   // initialization
   waitForExplicitFinish();
   let windowsToClose = [];
   let testURI =
     "http://example.com/tests/toolkit/components/satchel/test/subtst_privbrowsing.html";
 
   function doTest(aIsPrivateMode, aShouldValueExist, aWindow, aCallback) {
     aWindow.gBrowser.selectedBrowser.addEventListener("load", function onLoad() {
+      if (aWindow.content.location != testURI) {
+        aWindow.gBrowser.selectedBrowser.loadURI(testURI);
+        return;
+      }
       aWindow.gBrowser.selectedBrowser.removeEventListener("load", onLoad, true);
 
       let checks = 0;
       function doneCheck() {
         checks++;
         if (checks == 2) {
           executeSoon(aCallback);
         }