Bug 908534 - test that chromeUI notification is shown for about:support when opened as a new tab, r=ttaubert

This commit is contained in:
Gijs Kruitbosch 2014-06-11 11:56:30 +01:00
parent 07a4ac12e7
commit a8383c76d9
3 changed files with 27 additions and 0 deletions

View File

@ -87,6 +87,7 @@ skip-if = (os == "linux" || os == "mac") && debug # bug 970052, bug 970053
skip-if = os == "linux" # Bug 958026
support-files =
content_aboutAccounts.js
[browser_aboutSupport_newtab_security_state.js]
[browser_aboutHealthReport.js]
skip-if = os == "linux" # Bug 924307
[browser_aboutHome.js]

View File

@ -0,0 +1,20 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
add_task(function* checkIdentityOfAboutSupport() {
let tab = gBrowser.loadOneTab("about:support", {
referrerURI: null,
inBackground: false,
allowThirdPartyFixup: false,
relatedToCurrent: false,
skipAnimation: true,
disableMCB: false
});
yield promiseTabLoaded(tab);
let identityBox = document.getElementById("identity-box");
is(identityBox.className, gIdentityHandler.IDENTITY_MODE_CHROMEUI,
"Should know that we're chrome.");
gBrowser.removeTab(tab);
});

View File

@ -226,6 +226,12 @@ function whenTabLoaded(aTab, aCallback) {
}, true);
}
function promiseTabLoaded(aTab) {
let deferred = Promise.defer();
whenTabLoaded(aTab, deferred.resolve);
return deferred.promise;
}
function addVisits(aPlaceInfo, aCallback) {
let places = [];
if (aPlaceInfo instanceof Ci.nsIURI) {