Bug 1836657 - Port bug 1824613: Convert consumers of toolkit/mozapps/extensions/ to import ES modules directly. r=john.bieling
Differential Revision: https://phabricator.services.mozilla.com/D179887
This commit is contained in:
Родитель
e56e9d6b11
Коммит
bc3c68b7b8
|
@ -75,7 +75,7 @@ const startupPhases = {
|
|||
"resource:///modules/index_im.sys.mjs",
|
||||
"resource:///modules/MsgDBCacheManager.jsm",
|
||||
"resource:///modules/PeriodicFilterManager.jsm",
|
||||
"resource://gre/modules/Blocklist.jsm",
|
||||
"resource://gre/modules/Blocklist.sys.mjs",
|
||||
"resource://gre/modules/NewTabUtils.sys.mjs",
|
||||
"resource://gre/modules/Sqlite.sys.mjs",
|
||||
// Bug 1660907: These core modules shouldn't really be being loaded
|
||||
|
|
|
@ -3,8 +3,8 @@ const { AddonManagerPrivate } = ChromeUtils.import(
|
|||
"resource://gre/modules/AddonManager.jsm"
|
||||
);
|
||||
|
||||
const { AddonTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/AddonTestUtils.jsm"
|
||||
var { AddonTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/AddonTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
AddonTestUtils.initMochitest(this);
|
||||
|
|
|
@ -2,8 +2,8 @@ const { AddonManagerPrivate } = ChromeUtils.import(
|
|||
"resource://gre/modules/AddonManager.jsm"
|
||||
);
|
||||
|
||||
const { AddonTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/AddonTestUtils.jsm"
|
||||
var { AddonTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/AddonTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
AddonTestUtils.initMochitest(this);
|
||||
|
|
|
@ -2,8 +2,8 @@ const { AddonManagerPrivate } = ChromeUtils.import(
|
|||
"resource://gre/modules/AddonManager.jsm"
|
||||
);
|
||||
|
||||
const { AddonTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/AddonTestUtils.jsm"
|
||||
var { AddonTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/AddonTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
AddonTestUtils.initMochitest(this);
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
/* globals openAddonsMgr, openContentTab */
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"AddonTestUtils",
|
||||
"resource://testing-common/AddonTestUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
AddonTestUtils: "resource://testing-common/AddonTestUtils.sys.mjs",
|
||||
});
|
||||
|
||||
const BASE = getRootDirectory(gTestPath).replace(
|
||||
"chrome://mochitests/content/",
|
||||
|
|
|
@ -8,8 +8,8 @@ const { SearchTestUtils } = ChromeUtils.importESModule(
|
|||
const { TestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/TestUtils.sys.mjs"
|
||||
);
|
||||
var { AddonTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/AddonTestUtils.jsm"
|
||||
var { AddonTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/AddonTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
Services.prefs.setBoolPref("browser.search.log", true);
|
||||
|
|
|
@ -8,11 +8,10 @@
|
|||
|
||||
/* eslint-disable complexity */
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"LightweightThemeManager",
|
||||
"resource://gre/modules/LightweightThemeManager.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
LightweightThemeManager:
|
||||
"resource://gre/modules/LightweightThemeManager.sys.mjs",
|
||||
});
|
||||
|
||||
const onUpdatedEmitter = new EventEmitter();
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@ var { ExtensionTestUtils } = ChromeUtils.import(
|
|||
"resource://testing-common/ExtensionXPCShellUtils.jsm"
|
||||
);
|
||||
|
||||
var { AddonTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/AddonTestUtils.jsm"
|
||||
var { AddonTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/AddonTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
ExtensionTestUtils.mockAppInfo();
|
||||
|
|
|
@ -17,8 +17,8 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
AddrBookUtils: "resource:///modules/AddrBookUtils.jsm",
|
||||
});
|
||||
|
||||
var { AddonTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/AddonTestUtils.jsm"
|
||||
var { AddonTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/AddonTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
ExtensionTestUtils.mockAppInfo();
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
* 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/. */
|
||||
|
||||
var { AddonTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/AddonTestUtils.jsm"
|
||||
var { AddonTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/AddonTestUtils.sys.mjs"
|
||||
);
|
||||
var { ExtensionTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/ExtensionXPCShellUtils.jsm"
|
||||
|
|
|
@ -11,8 +11,8 @@ var { storeState, getState } = ChromeUtils.importESModule(
|
|||
const { AddonManager } = ChromeUtils.import(
|
||||
"resource://gre/modules/AddonManager.jsm"
|
||||
);
|
||||
const { AddonTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/AddonTestUtils.jsm"
|
||||
var { AddonTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/AddonTestUtils.sys.mjs"
|
||||
);
|
||||
const { TestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/TestUtils.sys.mjs"
|
||||
|
|
|
@ -8,8 +8,8 @@ var { ExtensionTestUtils } = ChromeUtils.import(
|
|||
"resource://testing-common/ExtensionXPCShellUtils.jsm"
|
||||
);
|
||||
|
||||
var { AddonTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/AddonTestUtils.jsm"
|
||||
var { AddonTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/AddonTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
ExtensionTestUtils.mockAppInfo();
|
||||
|
|
|
@ -8,8 +8,8 @@ var { ExtensionTestUtils } = ChromeUtils.import(
|
|||
"resource://testing-common/ExtensionXPCShellUtils.jsm"
|
||||
);
|
||||
|
||||
var { AddonTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/AddonTestUtils.jsm"
|
||||
var { AddonTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/AddonTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
ExtensionTestUtils.mockAppInfo();
|
||||
|
|
|
@ -13,8 +13,8 @@ var { TestUtils } = ChromeUtils.importESModule(
|
|||
var { ExtensionsUI } = ChromeUtils.import(
|
||||
"resource:///modules/ExtensionsUI.jsm"
|
||||
);
|
||||
var { AddonTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/AddonTestUtils.jsm"
|
||||
var { AddonTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/AddonTestUtils.sys.mjs"
|
||||
);
|
||||
var { PromiseTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/mailnews/PromiseTestUtils.jsm"
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
var { ExtensionTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/ExtensionXPCShellUtils.jsm"
|
||||
);
|
||||
var { AddonTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/AddonTestUtils.jsm"
|
||||
var { AddonTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/AddonTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
ExtensionTestUtils.mockAppInfo();
|
||||
|
|
|
@ -13,8 +13,8 @@ var { TestUtils } = ChromeUtils.importESModule(
|
|||
var { ExtensionsUI } = ChromeUtils.import(
|
||||
"resource:///modules/ExtensionsUI.jsm"
|
||||
);
|
||||
var { AddonTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/AddonTestUtils.jsm"
|
||||
var { AddonTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/AddonTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
ExtensionTestUtils.mockAppInfo();
|
||||
|
|
|
@ -10,11 +10,9 @@ ChromeUtils.defineModuleGetter(
|
|||
"AddonManager",
|
||||
"resource://gre/modules/AddonManager.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"AddonRepository",
|
||||
"resource://gre/modules/addons/AddonRepository.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
AddonRepository: "resource://gre/modules/addons/AddonRepository.sys.mjs",
|
||||
});
|
||||
|
||||
/* This dialog provides an interface for managing what language the messenger is
|
||||
* displayed in.
|
||||
|
|
Загрузка…
Ссылка в новой задаче