Bug 1148996 - Remove selected lightweight theme for mochitest and xpcshell tests;r=jmaher

This is for aurora (dev edition) compatibility.  In this channel, there is a
selected lightweight theme by default.  Tests don't expect this to be the case
so this simply resets the relevant prefs for mochitests and xpcshell tests.
This commit is contained in:
Brian Grinstead 2015-03-31 20:01:04 -07:00
parent 602337095e
commit 9dbf84b0a5
2 changed files with 17 additions and 0 deletions

View File

@ -310,3 +310,8 @@ user_pref("browser.readinglist.introShown", true);
// Don't let PAC generator to set PAC, as mochitest framework has its own PAC
// rules during testing.
user_pref("network.proxy.pac_generator", false);
// Make tests run consistently on DevEdition (which has a lightweight theme
// selected by default).
user_pref("lightweightThemes.selectedThemeID", "");
user_pref("browser.devedition.theme.enabled", false);

View File

@ -1422,3 +1422,15 @@ try {
prefs.setCharPref("browser.selfsupport.url", "https://%(server)s/selfsupport-dummy/");
}
} catch (e) { }
// Make tests run consistently on DevEdition (which has a lightweight theme
// selected by default).
try {
if (runningInParent) {
let prefs = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
prefs.deleteBranch("lightweightThemes.selectedThemeID");
prefs.deleteBranch("browser.devedition.theme.enabled");
}
} catch (e) { }