зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1329262 - Enable compact themes in mozscreenshots;r=MattN
MozReview-Commit-ID: A574iIkQgkW --HG-- extra : rebase_source : 3feabf2302c50f2d0b14961068188c0aef3202f3
This commit is contained in:
Родитель
1e5dd1300d
Коммит
0112b97c6a
|
@ -14,7 +14,9 @@ const EXTENSION_DIR = "chrome://mochitests/content/extensions/mozscreenshots/bro
|
|||
let TestRunner;
|
||||
|
||||
function* setup() {
|
||||
requestLongerTimeout(10);
|
||||
// This timeout doesn't actually end the job even if it is hit - the buildbot timeout will
|
||||
// handle things for us if the test actually hangs.
|
||||
requestLongerTimeout(100);
|
||||
|
||||
info("installing extension temporarily");
|
||||
let chromeURL = Services.io.newURI(EXTENSION_DIR);
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
this.EXPORTED_SYMBOLS = ["DevEdition"];
|
||||
|
||||
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
|
||||
const THEME_ID = "firefox-devedition@mozilla.org";
|
||||
|
||||
Cu.import("resource://gre/modules/LightweightThemeManager.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/Task.jsm");
|
||||
|
||||
this.DevEdition = {
|
||||
init(libDir) {},
|
||||
|
||||
configurations: {
|
||||
devEditionLight: {
|
||||
applyConfig: Task.async(() => {
|
||||
Services.prefs.setCharPref("devtools.theme", "light");
|
||||
LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme(THEME_ID);
|
||||
Services.prefs.setBoolPref("browser.devedition.theme.showCustomizeButton", true);
|
||||
}),
|
||||
},
|
||||
devEditionDark: {
|
||||
applyConfig: Task.async(() => {
|
||||
Services.prefs.setCharPref("devtools.theme", "dark");
|
||||
LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme(THEME_ID);
|
||||
Services.prefs.setBoolPref("browser.devedition.theme.showCustomizeButton", true);
|
||||
}),
|
||||
},
|
||||
devEditionOff: {
|
||||
applyConfig: Task.async(() => {
|
||||
Services.prefs.clearUserPref("devtools.theme");
|
||||
LightweightThemeManager.currentTheme = null;
|
||||
Services.prefs.clearUserPref("browser.devedition.theme.showCustomizeButton");
|
||||
}),
|
||||
},
|
||||
},
|
||||
};
|
|
@ -76,6 +76,17 @@ this.LightweightThemes = {
|
|||
verifyConfig: verifyConfigHelper,
|
||||
},
|
||||
|
||||
compactLight: {
|
||||
applyConfig: Task.async(() => {
|
||||
LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme("firefox-compact-light@mozilla.org");
|
||||
}),
|
||||
},
|
||||
|
||||
compactDark: {
|
||||
applyConfig: Task.async(() => {
|
||||
LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme("firefox-compact-dark@mozilla.org");
|
||||
}),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -11,8 +11,6 @@ add_task(function* capture() {
|
|||
return;
|
||||
}
|
||||
|
||||
requestLongerTimeout(20);
|
||||
|
||||
let sets = ["TabsInTitlebar", "Tabs", "WindowSize", "Toolbars", "LightweightThemes"];
|
||||
yield TestRunner.start(sets, "primaryUI");
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче