michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/publicdomain/zero/1.0/ michael@0: */ michael@0: michael@0: function test() { michael@0: waitForExplicitFinish(); michael@0: michael@0: registerCleanupFunction(function() { michael@0: Services.prefs.clearUserPref("browser.startup.homepage"); michael@0: Services.prefs.clearUserPref("browser.startup.page"); michael@0: win.close(); michael@0: }); michael@0: michael@0: let homepage = "about:home"; michael@0: Services.prefs.setCharPref("browser.startup.homepage", homepage); michael@0: Services.prefs.setIntPref("browser.startup.page", 1); michael@0: let win = OpenBrowserWindow(); michael@0: whenDelayedStartupFinished(win, function() { michael@0: let browser = win.gBrowser.selectedBrowser; michael@0: if (browser.contentDocument.readyState == "complete" && michael@0: browser.currentURI.spec == homepage) { michael@0: checkIdentityMode(win); michael@0: return; michael@0: } michael@0: michael@0: browser.addEventListener("load", function onLoad() { michael@0: if (browser.currentURI.spec != homepage) michael@0: return; michael@0: browser.removeEventListener("load", onLoad, true); michael@0: checkIdentityMode(win); michael@0: }, true); michael@0: }); michael@0: } michael@0: michael@0: function checkIdentityMode(win) { michael@0: let identityMode = win.document.getElementById("identity-box").className; michael@0: is(identityMode, "chromeUI", "Identity state should be chromeUI for about:home in a new window"); michael@0: finish(); michael@0: }