Bug 944128 - Random failures with test_bug_461710_perwindowpb.html. r=ehsan, a=test-only
--- a/toolkit/components/places/tests/mochitest/test_bug_461710_perwindowpb.html
+++ b/toolkit/components/places/tests/mochitest/test_bug_461710_perwindowpb.html
@@ -165,17 +165,17 @@ var mainWindow = window.QueryInterface(C
.getInterface(Ci.nsIDOMWindow);
var contentPage = "http://mochi.test:8888/tests/toolkit/components/places/tests/mochitest/bug_461710/iframe.html";
function testOnWindow(aIsPrivate, aCallback) {
var win = mainWindow.OpenBrowserWindow({private: aIsPrivate});
win.addEventListener("load", function onLoad() {
win.removeEventListener("load", onLoad, false);
win.addEventListener("DOMContentLoaded", function onInnerLoad() {
- if (win.content.location.href == "about:privatebrowsing") {
+ if (win.content.location.href != contentPage) {
win.gBrowser.loadURI(contentPage);
return;
}
win.removeEventListener("DOMContentLoaded", onInnerLoad, true);
win.gBrowser.selectedBrowser.focus();
SimpleTest.executeSoon(function() { aCallback(win); });
}, true);
SimpleTest.executeSoon(function() { win.gBrowser.loadURI(contentPage); });