mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 882977 - Identity state of IDENTITY_MODE_UNKNOWN is set for about:home when a new window is created. r=dao
--HG-- extra : rebase_source : 9c5e5f06645018333515dba89d4fc84cf9445338
This commit is contained in:
parent
d5e11c4b5c
commit
e31c6db7ca
@ -183,6 +183,7 @@ MOCHITEST_BROWSER_FILES = \
|
||||
browser_bug822367.js \
|
||||
browser_bug832435.js \
|
||||
browser_bug839103.js \
|
||||
browser_bug882977.js \
|
||||
browser_canonizeURL.js \
|
||||
browser_clearplugindata_noage.html \
|
||||
browser_clearplugindata.html \
|
||||
|
40
browser/base/content/test/browser_bug882977.js
Normal file
40
browser/base/content/test/browser_bug882977.js
Normal file
@ -0,0 +1,40 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
registerCleanupFunction(function() {
|
||||
Services.prefs.clearUserPref("browser.startup.homepage");
|
||||
Services.prefs.clearUserPref("browser.startup.page");
|
||||
win.close();
|
||||
});
|
||||
|
||||
let homepage = "about:home";
|
||||
Services.prefs.setCharPref("browser.startup.homepage", homepage);
|
||||
Services.prefs.setIntPref("browser.startup.page", 1);
|
||||
let win = OpenBrowserWindow();
|
||||
whenDelayedStartupFinished(win, function() {
|
||||
let browser = win.gBrowser.selectedBrowser;
|
||||
if (browser.contentDocument.readyState == "complete" &&
|
||||
browser.currentURI.spec == homepage) {
|
||||
checkIdentityMode(win);
|
||||
return;
|
||||
}
|
||||
|
||||
browser.addEventListener("load", function onLoad() {
|
||||
if (browser.currentURI.spec != homepage)
|
||||
return;
|
||||
browser.removeEventListener("load", onLoad, true);
|
||||
checkIdentityMode(win);
|
||||
}, true);
|
||||
});
|
||||
}
|
||||
|
||||
function checkIdentityMode(win) {
|
||||
let identityMode = win.document.getElementById("identity-box").className;
|
||||
is(identityMode, "unknownIdentity", "Identity should be chromeUI but is currently " +
|
||||
"shown as unknownIdentity for new windows.");
|
||||
finish();
|
||||
}
|
Loading…
Reference in New Issue
Block a user