Bug 950337 - Random failures in privatebrowsing/test/browser/browser_privatebrowsing_cache.js. r=ehsan, a=test-only
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Tue, 17 Dec 2013 15:13:43 +0200
changeset 167774 069d7c01db7d65c55b6d63594afff1277a1683a3
parent 167773 df1dead3ff6747fd1d402b4001f1e6e043d6b29d
child 167775 53889e96edd9298a89eb2ad767c32663c1db2861
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan, test-only
bugs950337
milestone27.0
Bug 950337 - Random failures in privatebrowsing/test/browser/browser_privatebrowsing_cache.js. r=ehsan, a=test-only
browser/components/privatebrowsing/test/browser/browser_privatebrowsing_cache.js
--- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_cache.js
+++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_cache.js
@@ -98,19 +98,17 @@ function getStorageEntryCount(device, go
       goon(this.entryCount);
     }
   };
 
   storage.asyncVisitStorage(visitor, true);
 }
 
 function get_cache_for_private_window () {
-  let win = OpenBrowserWindow({private: true});
-  win.addEventListener("load", function () {
-    win.removeEventListener("load", arguments.callee, false);
+  let win = whenNewWindowLoaded({private: true}, function() {
 
     executeSoon(function() {
 
       ok(true, "The private window got loaded");
 
       let tab = win.gBrowser.addTab("http://example.org");
       win.gBrowser.selectedTab = tab;
       let newTabBrowser = win.gBrowser.getBrowserForTab(tab);
@@ -130,10 +128,10 @@ function get_cache_for_private_window ()
 
               win.close();
               finish();
             });
           });
         });
       }, true);
     });
-  }, false);
+  });
 }