зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1830460 - Update tests for ComponentUtils ESM. r=arai,perftest-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D176783
This commit is contained in:
Родитель
5ee28fedd1
Коммит
aa1d9b8575
|
@ -29,7 +29,9 @@ SimpleTest.waitForExplicitFinish();
|
|||
* nsIChannel component written in Javascript.
|
||||
*/
|
||||
|
||||
const {ComponentUtils} = ChromeUtils.import("resource://gre/modules/ComponentUtils.jsm");
|
||||
const { ComponentUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/ComponentUtils.sys.mjs"
|
||||
);
|
||||
|
||||
var contentSecManager = Cc["@mozilla.org/contentsecuritymanager;1"]
|
||||
.getService(Ci.nsIContentSecurityManager);
|
||||
|
|
|
@ -13,7 +13,9 @@ const Cc = SpecialPowers.Cc;
|
|||
const Ci = SpecialPowers.Ci;
|
||||
const Cu = SpecialPowers.Cu;
|
||||
|
||||
const {ComponentUtils} = ChromeUtils.import("resource://gre/modules/ComponentUtils.jsm");
|
||||
const { ComponentUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/ComponentUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const HELPERAPP_DIALOG_CID =
|
||||
SpecialPowers.wrap(SpecialPowers.Components)
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
|
||||
const {AppConstants} = ChromeUtils.importESModule("resource://gre/modules/AppConstants.sys.mjs");
|
||||
const {ComponentUtils} = ChromeUtils.import("resource://gre/modules/ComponentUtils.jsm");
|
||||
const {ComponentUtils} = ChromeUtils.importESModule("resource://gre/modules/ComponentUtils.sys.mjs");
|
||||
const {Preferences} = ChromeUtils.importESModule("resource://gre/modules/Preferences.sys.mjs");
|
||||
const {XPCOMUtils} = ChromeUtils.importESModule("resource://gre/modules/XPCOMUtils.sys.mjs");
|
||||
|
||||
|
|
|
@ -14,11 +14,7 @@
|
|||
|
||||
import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const { ComponentUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/ComponentUtils.jsm"
|
||||
);
|
||||
|
||||
import { ComponentUtils } from "resource://gre/modules/ComponentUtils.sys.mjs";
|
||||
import { TestUtils } from "resource://testing-common/TestUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
/* globals ExtensionAPI, Services, XPCOMUtils */
|
||||
|
||||
const { ComponentUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/ComponentUtils.jsm"
|
||||
const { ComponentUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/ComponentUtils.sys.mjs"
|
||||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-env mozilla/process-script */
|
||||
|
||||
const { ComponentUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/ComponentUtils.jsm"
|
||||
const { ComponentUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/ComponentUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const WEBEXTENSION_ID = "tabswitch-talos@mozilla.org";
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Appease eslint.
|
||||
/* import-globals-from ../head_addons.js */
|
||||
|
||||
const { ComponentUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/ComponentUtils.jsm"
|
||||
const { ComponentUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/ComponentUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const MLBF_RECORD = {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-env mozilla/chrome-script */
|
||||
|
||||
const { ComponentUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/ComponentUtils.jsm"
|
||||
const { ComponentUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/ComponentUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const { Downloads } = ChromeUtils.importESModule(
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
const { ComponentUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/ComponentUtils.jsm"
|
||||
const { ComponentUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/ComponentUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const ROOT = getRootDirectory(gTestPath).replace(
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
const { ComponentUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/ComponentUtils.jsm"
|
||||
const { ComponentUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/ComponentUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const ROOT = getRootDirectory(gTestPath).replace(
|
||||
|
|
Загрузка…
Ссылка в новой задаче