forked from mirrors/gecko-dev
Bug 1799314 - Convert consumers of testing modules to import ES modules direct (services/). r=markh
Differential Revision: https://phabricator.services.mozilla.com/D161911
This commit is contained in:
parent
82a9bfdbe8
commit
bcbe5bc30d
10 changed files with 20 additions and 18 deletions
|
|
@ -9,8 +9,8 @@ var { XPCOMUtils } = ChromeUtils.importESModule(
|
|||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const { updateAppInfo } = ChromeUtils.import(
|
||||
"resource://testing-common/AppInfo.jsm"
|
||||
const { updateAppInfo } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/AppInfo.sys.mjs"
|
||||
);
|
||||
updateAppInfo({
|
||||
name: "XPCShell",
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ var {
|
|||
var { getTestLogger, initTestLogging } = ChromeUtils.import(
|
||||
"resource://testing-common/services/common/logging.js"
|
||||
);
|
||||
var { MockRegistrar } = ChromeUtils.import(
|
||||
"resource://testing-common/MockRegistrar.jsm"
|
||||
var { MockRegistrar } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/MockRegistrar.sys.mjs"
|
||||
);
|
||||
var { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ try {
|
|||
OS = "Linux";
|
||||
}
|
||||
|
||||
const { updateAppInfo } = ChromeUtils.import(
|
||||
"resource://testing-common/AppInfo.jsm"
|
||||
const { updateAppInfo } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/AppInfo.sys.mjs"
|
||||
);
|
||||
updateAppInfo({
|
||||
name: "XPCShell",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* import-globals-from ../../../common/tests/unit/head_helpers.js */
|
||||
|
||||
const { TestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/TestUtils.jsm"
|
||||
const { TestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/TestUtils.sys.mjs"
|
||||
);
|
||||
const { Utils } = ChromeUtils.import("resource://services-settings/Utils.jsm");
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const { TestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/TestUtils.jsm"
|
||||
const { TestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/TestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const { RemoteSettingsWorker } = ChromeUtils.import(
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ http://creativecommons.org/publicdomain/zero/1.0/ */
|
|||
|
||||
"use strict";
|
||||
|
||||
const { TestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/TestUtils.jsm"
|
||||
const { TestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/TestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const { Database } = ChromeUtils.import(
|
||||
|
|
|
|||
|
|
@ -26,7 +26,9 @@ const { CommonUtils } = ChromeUtils.import(
|
|||
const { CryptoUtils } = ChromeUtils.import(
|
||||
"resource://services-crypto/utils.js"
|
||||
);
|
||||
const { Assert } = ChromeUtils.import("resource://testing-common/Assert.jsm");
|
||||
const { Assert } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/Assert.sys.mjs"
|
||||
);
|
||||
const { initTestLogging } = ChromeUtils.import(
|
||||
"resource://testing-common/services/common/logging.js"
|
||||
);
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ function getOS() {
|
|||
}
|
||||
}
|
||||
|
||||
const { updateAppInfo } = ChromeUtils.import(
|
||||
"resource://testing-common/AppInfo.jsm"
|
||||
const { updateAppInfo } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/AppInfo.sys.mjs"
|
||||
);
|
||||
updateAppInfo({
|
||||
name: "XPCShell",
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ var Cm = Components.manager;
|
|||
// Shared logging for all HTTP server functions.
|
||||
var { Log } = ChromeUtils.importESModule("resource://gre/modules/Log.sys.mjs");
|
||||
var { CommonUtils } = ChromeUtils.import("resource://services-common/utils.js");
|
||||
var { TestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/TestUtils.jsm"
|
||||
var { TestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/TestUtils.sys.mjs"
|
||||
);
|
||||
var {
|
||||
AccountState,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ const { Weave } = ChromeUtils.import("resource://services-sync/main.js");
|
|||
const { Logger } = ChromeUtils.import("resource://tps/logger.jsm");
|
||||
|
||||
// Unfortunately, due to where TPS is run, we can't directly reuse the logic from
|
||||
// BrowserTestUtils.jsm. Moreover, we can't resolve the URI it loads the content
|
||||
// BrowserTestUtils.sys.mjs. Moreover, we can't resolve the URI it loads the content
|
||||
// frame script from ("chrome://mochikit/content/tests/BrowserTestUtils/content-utils.js"),
|
||||
// hence the hackiness here and in BrowserTabs.Add.
|
||||
Services.mm.loadFrameScript(
|
||||
|
|
|
|||
Loading…
Reference in a new issue