зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1540856: Part 3 - Ensure the default theme is enabled for browser mochitests. r=aswan
Differential Revision: https://phabricator.services.mozilla.com/D25679 --HG-- extra : rebase_source : f8abe07c8d7457bf171f313eb2946d75da90269d extra : histedit_source : 9c03cf7d02cbd1d19550770601dcd2a8b793418f
This commit is contained in:
Родитель
9f4c5aa344
Коммит
2751f398be
|
@ -12,6 +12,8 @@ var gSaveInstrumentationData = null;
|
|||
var {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
||||
var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
ChromeUtils.defineModuleGetter(this, "AddonManager",
|
||||
"resource://gre/modules/AddonManager.jsm");
|
||||
ChromeUtils.defineModuleGetter(this, "ContentSearch",
|
||||
"resource:///modules/ContentSearch.jsm");
|
||||
|
||||
|
@ -522,6 +524,7 @@ Tester.prototype = {
|
|||
},
|
||||
|
||||
async waitForWindowsReady() {
|
||||
await this.setupDefaultTheme();
|
||||
await new Promise(resolve => this.waitForGraphicsTestWindowToBeGone(resolve));
|
||||
await this.promiseMainWindowReady();
|
||||
},
|
||||
|
@ -533,6 +536,13 @@ Tester.prototype = {
|
|||
}
|
||||
},
|
||||
|
||||
async setupDefaultTheme() {
|
||||
// Developer Edition enables the wrong theme by default. Make sure
|
||||
// the ordinary default theme is enabled.
|
||||
let theme = await AddonManager.getAddonByID("default-theme@mozilla.org");
|
||||
await theme.enable();
|
||||
},
|
||||
|
||||
waitForGraphicsTestWindowToBeGone(aCallback) {
|
||||
for (let win of Services.wm.getEnumerator(null)) {
|
||||
if (win != window && !win.closed &&
|
||||
|
|
Загрузка…
Ссылка в новой задаче