mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1169993 - Remove duplicated setTheme methods from performance and webaudio tests. r=bgrins
This commit is contained in:
parent
0cb894dbb3
commit
f257f9257d
@ -6,6 +6,8 @@
|
||||
* theme on load, and rerenders when changed.
|
||||
*/
|
||||
|
||||
const { setTheme } = devtools.require("devtools/shared/theme");
|
||||
|
||||
const LIGHT_BG = "#fcfcfc";
|
||||
const DARK_BG = "#14171a";
|
||||
|
||||
@ -70,19 +72,3 @@ function* spawnTest() {
|
||||
yield teardown(panel);
|
||||
finish();
|
||||
}
|
||||
|
||||
/**
|
||||
* Mimics selecting the theme selector in the toolbox;
|
||||
* sets the preference and emits an event on gDevTools to trigger
|
||||
* the themeing.
|
||||
*/
|
||||
function setTheme (newTheme) {
|
||||
let oldTheme = Services.prefs.getCharPref("devtools.theme");
|
||||
info("Setting `devtools.theme` to \"" + newTheme + "\"");
|
||||
Services.prefs.setCharPref("devtools.theme", newTheme);
|
||||
gDevTools.emit("pref-changed", {
|
||||
pref: "devtools.theme",
|
||||
newValue: newTheme,
|
||||
oldValue: oldTheme
|
||||
});
|
||||
}
|
||||
|
@ -5,6 +5,8 @@
|
||||
* Tests that the SVG marker styling is updated when devtools theme changes.
|
||||
*/
|
||||
|
||||
const { setTheme } = devtools.require("devtools/shared/theme");
|
||||
|
||||
add_task(function*() {
|
||||
let { target, panel } = yield initWebAudioEditor(SIMPLE_CONTEXT_URL);
|
||||
let { panelWin } = panel;
|
||||
@ -57,19 +59,3 @@ add_task(function*() {
|
||||
function getFill (el) {
|
||||
return el.getAttribute("style").match(/(#.*)$/)[1];
|
||||
}
|
||||
|
||||
/**
|
||||
* Mimics selecting the theme selector in the toolbox;
|
||||
* sets the preference and emits an event on gDevTools to trigger
|
||||
* the themeing.
|
||||
*/
|
||||
function setTheme (newTheme) {
|
||||
let oldTheme = Services.prefs.getCharPref("devtools.theme");
|
||||
info("Setting `devtools.theme` to \"" + newTheme + "\"");
|
||||
Services.prefs.setCharPref("devtools.theme", newTheme);
|
||||
gDevTools.emit("pref-changed", {
|
||||
pref: "devtools.theme",
|
||||
newValue: newTheme,
|
||||
oldValue: oldTheme
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user