Bug 944126 - Random failures with browser_privatebrowsing_aboutSessionRestore.js, r=ehsan

--HG--
extra : rebase_source : 163eb5bc1e765958136f7f54211cf5b0cca0a69d
This commit is contained in:
Olli Pettay 2013-11-28 18:50:18 +02:00
parent 14a059f4d9
commit 9ac767ea64

View File

@ -18,6 +18,10 @@ function test() {
win.gBrowser.selectedTab = newTab; win.gBrowser.selectedTab = newTab;
let tabBrowser = win.gBrowser.getBrowserForTab(newTab); let tabBrowser = win.gBrowser.getBrowserForTab(newTab);
tabBrowser.addEventListener("load", function tabLoadListener() { tabBrowser.addEventListener("load", function tabLoadListener() {
if (win.gBrowser.contentWindow.location != "about:sessionrestore") {
win.gBrowser.selectedBrowser.loadURI("about:sessionrestore");
return;
}
tabBrowser.removeEventListener("load", tabLoadListener, true); tabBrowser.removeEventListener("load", tabLoadListener, true);
executeSoon(function() { executeSoon(function() {
info("about:sessionrestore got loaded"); info("about:sessionrestore got loaded");