Bug 857427 - Try to load the page again if not yet loaded. r=ehsan

This commit is contained in:
Olli Pettay 2014-01-10 10:20:09 -05:00
parent eed60a3952
commit e0b9b7d268

View File

@ -16,10 +16,13 @@ function triggerSave(aWindow, aCallback) {
var fileName;
let testBrowser = aWindow.gBrowser.selectedBrowser;
// This page sets a cookie if and only if a cookie does not exist yet
testBrowser.loadURI("http://mochi.test:8888/browser/browser/base/content/test/general/bug792517-2.html");
let testURI = "http://mochi.test:8888/browser/browser/base/content/test/general/bug792517-2.html";
testBrowser.loadURI(testURI);
testBrowser.addEventListener("pageshow", function pageShown(event) {
if (event.target.location == "about:blank")
if (event.target.location != testURI) {
testBrowser.loadURI(testURI);
return;
}
testBrowser.removeEventListener("pageshow", pageShown, false);
executeSoon(function () {