Bug 1834204 - Update more consumers to import ES modules directly. r=kpatenio,geckoview-reviewers,whimboo,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D178590
This commit is contained in:
@@ -4,13 +4,9 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
|
|
||||||
import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
|
import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
|
||||||
import { PrivateBrowsingUtils } from "resource://gre/modules/PrivateBrowsingUtils.sys.mjs";
|
import { PrivateBrowsingUtils } from "resource://gre/modules/PrivateBrowsingUtils.sys.mjs";
|
||||||
|
import { RemotePageChild } from "resource://gre/actors/RemotePageChild.sys.mjs";
|
||||||
const { RemotePageChild } = ChromeUtils.import(
|
|
||||||
"resource://gre/actors/RemotePageChild.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
|
|||||||
@@ -281,9 +281,6 @@ var whitelist = [
|
|||||||
// toolkit/xre/MacRunFromDmgUtils.mm
|
// toolkit/xre/MacRunFromDmgUtils.mm
|
||||||
{ file: "resource://gre/localization/en-US/toolkit/global/run-from-dmg.ftl" },
|
{ file: "resource://gre/localization/en-US/toolkit/global/run-from-dmg.ftl" },
|
||||||
|
|
||||||
// References to esm generated from jsm programmatically
|
|
||||||
{ file: "resource://gre/modules/LangPackMatcher.sys.mjs" },
|
|
||||||
|
|
||||||
// Referenced by screenshots extension
|
// Referenced by screenshots extension
|
||||||
{ file: "chrome://browser/content/screenshots/cancel.svg" },
|
{ file: "chrome://browser/content/screenshots/cancel.svg" },
|
||||||
{ file: "chrome://browser/content/screenshots/copy.svg" },
|
{ file: "chrome://browser/content/screenshots/copy.svg" },
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||||||
"resource://gre/modules/psm/RemoteSecuritySettings.sys.mjs",
|
"resource://gre/modules/psm/RemoteSecuritySettings.sys.mjs",
|
||||||
RemoteSettings: "resource://services-settings/remote-settings.sys.mjs",
|
RemoteSettings: "resource://services-settings/remote-settings.sys.mjs",
|
||||||
SafeBrowsing: "resource://gre/modules/SafeBrowsing.sys.mjs",
|
SafeBrowsing: "resource://gre/modules/SafeBrowsing.sys.mjs",
|
||||||
|
Sanitizer: "resource:///modules/Sanitizer.sys.mjs",
|
||||||
SaveToPocket: "chrome://pocket/content/SaveToPocket.sys.mjs",
|
SaveToPocket: "chrome://pocket/content/SaveToPocket.sys.mjs",
|
||||||
ScreenshotsUtils: "resource:///modules/ScreenshotsUtils.sys.mjs",
|
ScreenshotsUtils: "resource:///modules/ScreenshotsUtils.sys.mjs",
|
||||||
SearchSERPTelemetry: "resource:///modules/SearchSERPTelemetry.sys.mjs",
|
SearchSERPTelemetry: "resource:///modules/SearchSERPTelemetry.sys.mjs",
|
||||||
@@ -93,7 +94,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||||||
"resource://activity-stream/lib/OnboardingMessageProvider.jsm",
|
"resource://activity-stream/lib/OnboardingMessageProvider.jsm",
|
||||||
PageActions: "resource:///modules/PageActions.jsm",
|
PageActions: "resource:///modules/PageActions.jsm",
|
||||||
ProcessHangMonitor: "resource:///modules/ProcessHangMonitor.jsm",
|
ProcessHangMonitor: "resource:///modules/ProcessHangMonitor.jsm",
|
||||||
Sanitizer: "resource:///modules/Sanitizer.jsm",
|
|
||||||
TabCrashHandler: "resource:///modules/ContentCrashHandlers.jsm",
|
TabCrashHandler: "resource:///modules/ContentCrashHandlers.jsm",
|
||||||
TabUnloader: "resource:///modules/TabUnloader.jsm",
|
TabUnloader: "resource:///modules/TabUnloader.jsm",
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -16,14 +16,11 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||||||
LoginCSVImport: "resource://gre/modules/LoginCSVImport.sys.mjs",
|
LoginCSVImport: "resource://gre/modules/LoginCSVImport.sys.mjs",
|
||||||
LoginExport: "resource://gre/modules/LoginExport.sys.mjs",
|
LoginExport: "resource://gre/modules/LoginExport.sys.mjs",
|
||||||
LoginHelper: "resource://gre/modules/LoginHelper.sys.mjs",
|
LoginHelper: "resource://gre/modules/LoginHelper.sys.mjs",
|
||||||
|
MigrationUtils: "resource:///modules/MigrationUtils.sys.mjs",
|
||||||
OSKeyStore: "resource://gre/modules/OSKeyStore.sys.mjs",
|
OSKeyStore: "resource://gre/modules/OSKeyStore.sys.mjs",
|
||||||
UIState: "resource://services-sync/UIState.sys.mjs",
|
UIState: "resource://services-sync/UIState.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|
||||||
MigrationUtils: "resource:///modules/MigrationUtils.jsm",
|
|
||||||
});
|
|
||||||
|
|
||||||
XPCOMUtils.defineLazyGetter(lazy, "log", () => {
|
XPCOMUtils.defineLazyGetter(lazy, "log", () => {
|
||||||
return lazy.LoginHelper.createLogger("AboutLoginsParent");
|
return lazy.LoginHelper.createLogger("AboutLoginsParent");
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -10,16 +10,13 @@ const lazy = {};
|
|||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
CustomizableUI: "resource:///modules/CustomizableUI.sys.mjs",
|
CustomizableUI: "resource:///modules/CustomizableUI.sys.mjs",
|
||||||
|
LoginHelper: "resource://gre/modules/LoginHelper.sys.mjs",
|
||||||
PanelMultiView: "resource:///modules/PanelMultiView.sys.mjs",
|
PanelMultiView: "resource:///modules/PanelMultiView.sys.mjs",
|
||||||
RecentlyClosedTabsAndWindowsMenuUtils:
|
RecentlyClosedTabsAndWindowsMenuUtils:
|
||||||
"resource:///modules/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.sys.mjs",
|
"resource:///modules/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.sys.mjs",
|
||||||
|
Sanitizer: "resource:///modules/Sanitizer.sys.mjs",
|
||||||
SessionStore: "resource:///modules/sessionstore/SessionStore.sys.mjs",
|
SessionStore: "resource:///modules/sessionstore/SessionStore.sys.mjs",
|
||||||
ShortcutUtils: "resource://gre/modules/ShortcutUtils.sys.mjs",
|
ShortcutUtils: "resource://gre/modules/ShortcutUtils.sys.mjs",
|
||||||
LoginHelper: "resource://gre/modules/LoginHelper.sys.mjs",
|
|
||||||
});
|
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|
||||||
Sanitizer: "resource:///modules/Sanitizer.jsm",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const kPrefCustomizationDebug = "browser.uiCustomization.debug";
|
const kPrefCustomizationDebug = "browser.uiCustomization.debug";
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ const SAVE_PER_SITE_PREF = SAVE_PER_SITE_PREF_BRANCH + ".savePerSite";
|
|||||||
let { FileUtils } = ChromeUtils.importESModule(
|
let { FileUtils } = ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/FileUtils.sys.mjs"
|
"resource://gre/modules/FileUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
let { DownloadLastDir } = ChromeUtils.import(
|
let { DownloadLastDir } = ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/DownloadLastDir.jsm"
|
"resource://gre/modules/DownloadLastDir.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
add_task(
|
add_task(
|
||||||
|
|||||||
@@ -21,10 +21,7 @@ XPCOMUtils.defineLazyGetter(lazy, "makeRange", () => {
|
|||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
Preferences: "resource://gre/modules/Preferences.sys.mjs",
|
Preferences: "resource://gre/modules/Preferences.sys.mjs",
|
||||||
});
|
Sanitizer: "resource:///modules/Sanitizer.sys.mjs",
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|
||||||
Sanitizer: "resource:///modules/Sanitizer.jsm",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
class BrowsingDataDelegate {
|
class BrowsingDataDelegate {
|
||||||
|
|||||||
@@ -4,12 +4,8 @@
|
|||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(this, {
|
ChromeUtils.defineESModuleGetters(this, {
|
||||||
Preferences: "resource://gre/modules/Preferences.sys.mjs",
|
Preferences: "resource://gre/modules/Preferences.sys.mjs",
|
||||||
|
Sanitizer: "resource:///modules/Sanitizer.sys.mjs",
|
||||||
});
|
});
|
||||||
ChromeUtils.defineModuleGetter(
|
|
||||||
this,
|
|
||||||
"Sanitizer",
|
|
||||||
"resource:///modules/Sanitizer.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
const PREF_DOMAIN = "privacy.cpd.";
|
const PREF_DOMAIN = "privacy.cpd.";
|
||||||
const SETTINGS_LIST = [
|
const SETTINGS_LIST = [
|
||||||
|
|||||||
@@ -5,8 +5,10 @@
|
|||||||
const lazy = {};
|
const lazy = {};
|
||||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
LoginCSVImport: "resource://gre/modules/LoginCSVImport.jsm",
|
LoginCSVImport: "resource://gre/modules/LoginCSVImport.sys.mjs",
|
||||||
|
MigrationWizardConstants:
|
||||||
|
"chrome://browser/content/migration/migration-wizard-constants.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyGetter(lazy, "gFluentStrings", function () {
|
XPCOMUtils.defineLazyGetter(lazy, "gFluentStrings", function () {
|
||||||
@@ -16,11 +18,6 @@ XPCOMUtils.defineLazyGetter(lazy, "gFluentStrings", function () {
|
|||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
|
||||||
MigrationWizardConstants:
|
|
||||||
"chrome://browser/content/migration/migration-wizard-constants.mjs",
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class for a migration that involves reading a single file off of
|
* Base class for a migration that involves reading a single file off of
|
||||||
* the disk that the user picks using a file picker. The file might be
|
* the disk that the user picks using a file picker. The file might be
|
||||||
|
|||||||
@@ -898,8 +898,8 @@ class MigrationUtils {
|
|||||||
|
|
||||||
async insertCreditCardsWrapper(cards) {
|
async insertCreditCardsWrapper(cards) {
|
||||||
this._importQuantities.cards += cards.length;
|
this._importQuantities.cards += cards.length;
|
||||||
let { formAutofillStorage } = ChromeUtils.import(
|
let { formAutofillStorage } = ChromeUtils.importESModule(
|
||||||
"resource://autofill/FormAutofillStorage.jsm"
|
"resource://autofill/FormAutofillStorage.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
await formAutofillStorage.initialize();
|
await formAutofillStorage.initialize();
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ http://creativecommons.org/publicdomain/zero/1.0/ */
|
|||||||
const { PasswordFileMigrator } = ChromeUtils.importESModule(
|
const { PasswordFileMigrator } = ChromeUtils.importESModule(
|
||||||
"resource:///modules/FileMigrators.sys.mjs"
|
"resource:///modules/FileMigrators.sys.mjs"
|
||||||
);
|
);
|
||||||
const { LoginCSVImport } = ChromeUtils.import(
|
const { LoginCSVImport } = ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/LoginCSVImport.jsm"
|
"resource://gre/modules/LoginCSVImport.sys.mjs"
|
||||||
);
|
);
|
||||||
const { sinon } = ChromeUtils.importESModule(
|
const { sinon } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/Sinon.sys.mjs"
|
"resource://testing-common/Sinon.sys.mjs"
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||||||
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
|
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
|
||||||
BuiltInThemes: "resource:///modules/BuiltInThemes.sys.mjs",
|
BuiltInThemes: "resource:///modules/BuiltInThemes.sys.mjs",
|
||||||
FxAccounts: "resource://gre/modules/FxAccounts.sys.mjs",
|
FxAccounts: "resource://gre/modules/FxAccounts.sys.mjs",
|
||||||
|
LangPackMatcher: "resource://gre/modules/LangPackMatcher.sys.mjs",
|
||||||
ShellService: "resource:///modules/ShellService.sys.mjs",
|
ShellService: "resource:///modules/ShellService.sys.mjs",
|
||||||
SpecialMessageActions:
|
SpecialMessageActions:
|
||||||
"resource://messaging-system/lib/SpecialMessageActions.sys.mjs",
|
"resource://messaging-system/lib/SpecialMessageActions.sys.mjs",
|
||||||
@@ -23,14 +24,10 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||||
AddonManager: "resource://gre/modules/AddonManager.jsm",
|
AddonManager: "resource://gre/modules/AddonManager.jsm",
|
||||||
|
|
||||||
AboutWelcomeTelemetry:
|
AboutWelcomeTelemetry:
|
||||||
"resource://activity-stream/aboutwelcome/lib/AboutWelcomeTelemetry.jsm",
|
"resource://activity-stream/aboutwelcome/lib/AboutWelcomeTelemetry.jsm",
|
||||||
|
|
||||||
AboutWelcomeDefaults:
|
AboutWelcomeDefaults:
|
||||||
"resource://activity-stream/aboutwelcome/lib/AboutWelcomeDefaults.jsm",
|
"resource://activity-stream/aboutwelcome/lib/AboutWelcomeDefaults.jsm",
|
||||||
|
|
||||||
LangPackMatcher: "resource://gre/modules/LangPackMatcher.jsm",
|
|
||||||
AWScreenUtils: "resource://activity-stream/lib/AWScreenUtils.jsm",
|
AWScreenUtils: "resource://activity-stream/lib/AWScreenUtils.jsm",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||||||
"resource://messaging-system/lib/SpecialMessageActions.sys.mjs",
|
"resource://messaging-system/lib/SpecialMessageActions.sys.mjs",
|
||||||
TargetingContext: "resource://messaging-system/targeting/Targeting.sys.mjs",
|
TargetingContext: "resource://messaging-system/targeting/Targeting.sys.mjs",
|
||||||
Utils: "resource://services-settings/Utils.sys.mjs",
|
Utils: "resource://services-settings/Utils.sys.mjs",
|
||||||
|
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||||
@@ -41,7 +42,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||||||
"resource://activity-stream/lib/ASRouterTriggerListeners.jsm",
|
"resource://activity-stream/lib/ASRouterTriggerListeners.jsm",
|
||||||
KintoHttpClient: "resource://services-common/kinto-http-client.js",
|
KintoHttpClient: "resource://services-common/kinto-http-client.js",
|
||||||
RemoteL10n: "resource://activity-stream/lib/RemoteL10n.jsm",
|
RemoteL10n: "resource://activity-stream/lib/RemoteL10n.jsm",
|
||||||
setTimeout: "resource://gre/modules/Timer.jsm",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyServiceGetters(lazy, {
|
XPCOMUtils.defineLazyServiceGetters(lazy, {
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ ChromeUtils.defineModuleGetter(
|
|||||||
);
|
);
|
||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
|
NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||||
Region: "resource://gre/modules/Region.sys.mjs",
|
Region: "resource://gre/modules/Region.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -99,11 +100,6 @@ ChromeUtils.defineModuleGetter(
|
|||||||
"DiscoveryStreamFeed",
|
"DiscoveryStreamFeed",
|
||||||
"resource://activity-stream/lib/DiscoveryStreamFeed.jsm"
|
"resource://activity-stream/lib/DiscoveryStreamFeed.jsm"
|
||||||
);
|
);
|
||||||
ChromeUtils.defineModuleGetter(
|
|
||||||
lazy,
|
|
||||||
"NimbusFeatures",
|
|
||||||
"resource://nimbus/ExperimentAPI.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
const REGION_BASIC_CONFIG =
|
const REGION_BASIC_CONFIG =
|
||||||
"browser.newtabpage.activity-stream.discoverystream.region-basic-config";
|
"browser.newtabpage.activity-stream.discoverystream.region-basic-config";
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { getAddonAndLocalAPIsMocker } = ChromeUtils.import(
|
const { getAddonAndLocalAPIsMocker } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/LangPackMatcherTestUtils.jsm"
|
"resource://testing-common/LangPackMatcherTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
const { AWScreenUtils } = ChromeUtils.import(
|
const { AWScreenUtils } = ChromeUtils.import(
|
||||||
|
|||||||
@@ -11,18 +11,11 @@ if (AppConstants.platform === "macosx") {
|
|||||||
requestLongerTimeout(2);
|
requestLongerTimeout(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.import(
|
|
||||||
"resource://gre/modules/XPCOMUtils.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(this, {
|
ChromeUtils.defineESModuleGetters(this, {
|
||||||
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
|
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
|
||||||
|
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||||
TelemetryTestUtils: "resource://testing-common/TelemetryTestUtils.sys.mjs",
|
TelemetryTestUtils: "resource://testing-common/TelemetryTestUtils.sys.mjs",
|
||||||
});
|
UrlbarTestUtils: "resource://testing-common/UrlbarTestUtils.sys.mjs",
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
|
||||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.jsm",
|
|
||||||
UrlbarTestUtils: "resource://testing-common/UrlbarTestUtils.jsm",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const OPEN_TYPE = {
|
const OPEN_TYPE = {
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { TelemetryTestUtils } = ChromeUtils.import(
|
const { TelemetryTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/TelemetryTestUtils.jsm"
|
"resource://testing-common/TelemetryTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
// Visited pages listed by descending visit date.
|
// Visited pages listed by descending visit date.
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { TelemetryTestUtils } = ChromeUtils.import(
|
const { TelemetryTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/TelemetryTestUtils.jsm"
|
"resource://testing-common/TelemetryTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
let bookmarks;
|
let bookmarks;
|
||||||
let folder;
|
let folder;
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { TelemetryTestUtils } = ChromeUtils.import(
|
const { TelemetryTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/TelemetryTestUtils.jsm"
|
"resource://testing-common/TelemetryTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
const firstNodeIndex = 0;
|
const firstNodeIndex = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,9 @@ const URIS = [
|
|||||||
|
|
||||||
const FTP_URL = "ftp://localhost/clearHistoryOnShutdown/";
|
const FTP_URL = "ftp://localhost/clearHistoryOnShutdown/";
|
||||||
|
|
||||||
const { Sanitizer } = ChromeUtils.import("resource:///modules/Sanitizer.jsm");
|
const { Sanitizer } = ChromeUtils.importESModule(
|
||||||
|
"resource:///modules/Sanitizer.sys.mjs"
|
||||||
|
);
|
||||||
|
|
||||||
// Send the profile-after-change notification to the form history component to ensure
|
// Send the profile-after-change notification to the form history component to ensure
|
||||||
// that it has been initialized.
|
// that it has been initialized.
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||||||
FeatureGate: "resource://featuregates/FeatureGate.sys.mjs",
|
FeatureGate: "resource://featuregates/FeatureGate.sys.mjs",
|
||||||
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
|
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
|
||||||
FirefoxRelay: "resource://gre/modules/FirefoxRelay.sys.mjs",
|
FirefoxRelay: "resource://gre/modules/FirefoxRelay.sys.mjs",
|
||||||
|
LangPackMatcher: "resource://gre/modules/LangPackMatcher.sys.mjs",
|
||||||
LoginHelper: "resource://gre/modules/LoginHelper.sys.mjs",
|
LoginHelper: "resource://gre/modules/LoginHelper.sys.mjs",
|
||||||
NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs",
|
NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||||
OSKeyStore: "resource://gre/modules/OSKeyStore.sys.mjs",
|
OSKeyStore: "resource://gre/modules/OSKeyStore.sys.mjs",
|
||||||
@@ -106,7 +107,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||||||
"resource://gre/modules/ExtensionPreferencesManager.jsm",
|
"resource://gre/modules/ExtensionPreferencesManager.jsm",
|
||||||
ExtensionSettingsStore: "resource://gre/modules/ExtensionSettingsStore.jsm",
|
ExtensionSettingsStore: "resource://gre/modules/ExtensionSettingsStore.jsm",
|
||||||
HomePage: "resource:///modules/HomePage.jsm",
|
HomePage: "resource:///modules/HomePage.jsm",
|
||||||
LangPackMatcher: "resource://gre/modules/LangPackMatcher.jsm",
|
|
||||||
SelectionChangedMenulist: "resource:///modules/SelectionChangedMenulist.jsm",
|
SelectionChangedMenulist: "resource:///modules/SelectionChangedMenulist.jsm",
|
||||||
SiteDataManager: "resource:///modules/SiteDataManager.jsm",
|
SiteDataManager: "resource:///modules/SiteDataManager.jsm",
|
||||||
TransientPrefs: "resource:///modules/TransientPrefs.jsm",
|
TransientPrefs: "resource:///modules/TransientPrefs.jsm",
|
||||||
|
|||||||
@@ -32,9 +32,10 @@ const ISOLATE_UI_PREF =
|
|||||||
"browser.contentblocking.reject-and-isolate-cookies.preferences.ui.enabled";
|
"browser.contentblocking.reject-and-isolate-cookies.preferences.ui.enabled";
|
||||||
const FPI_PREF = "privacy.firstparty.isolate";
|
const FPI_PREF = "privacy.firstparty.isolate";
|
||||||
|
|
||||||
const { EnterprisePolicyTesting, PoliciesPrefTracker } = ChromeUtils.import(
|
const { EnterprisePolicyTesting, PoliciesPrefTracker } =
|
||||||
"resource://testing-common/EnterprisePolicyTesting.jsm"
|
ChromeUtils.importESModule(
|
||||||
);
|
"resource://testing-common/EnterprisePolicyTesting.sys.mjs"
|
||||||
|
);
|
||||||
|
|
||||||
requestLongerTimeout(2);
|
requestLongerTimeout(2);
|
||||||
|
|
||||||
|
|||||||
@@ -26,11 +26,9 @@ const TEST_SERVICE_WORKER_URL =
|
|||||||
const REMOVE_DIALOG_URL =
|
const REMOVE_DIALOG_URL =
|
||||||
"chrome://browser/content/preferences/dialogs/siteDataRemoveSelected.xhtml";
|
"chrome://browser/content/preferences/dialogs/siteDataRemoveSelected.xhtml";
|
||||||
|
|
||||||
ChromeUtils.defineModuleGetter(
|
ChromeUtils.defineESModuleGetters(this, {
|
||||||
this,
|
SiteDataTestUtils: "resource://testing-common/SiteDataTestUtils.sys.mjs",
|
||||||
"SiteDataTestUtils",
|
});
|
||||||
"resource://testing-common/SiteDataTestUtils.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
XPCOMUtils.defineLazyServiceGetter(
|
XPCOMUtils.defineLazyServiceGetter(
|
||||||
this,
|
this,
|
||||||
|
|||||||
@@ -19,11 +19,9 @@
|
|||||||
|
|
||||||
requestLongerTimeout(3);
|
requestLongerTimeout(3);
|
||||||
|
|
||||||
ChromeUtils.defineModuleGetter(
|
ChromeUtils.defineESModuleGetters(this, {
|
||||||
this,
|
AppConstants: "resource://gre/modules/AppConstants.sys.mjs",
|
||||||
"AppConstants",
|
});
|
||||||
"resource://gre/modules/AppConstants.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
// =============================================================================================
|
// =============================================================================================
|
||||||
// =============================================================================================
|
// =============================================================================================
|
||||||
|
|||||||
@@ -19,11 +19,9 @@
|
|||||||
|
|
||||||
requestLongerTimeout(3);
|
requestLongerTimeout(3);
|
||||||
|
|
||||||
ChromeUtils.defineModuleGetter(
|
ChromeUtils.defineESModuleGetters(this, {
|
||||||
this,
|
AppConstants: "resource://gre/modules/AppConstants.sys.mjs",
|
||||||
"AppConstants",
|
});
|
||||||
"resource://gre/modules/AppConstants.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
// =============================================================================================
|
// =============================================================================================
|
||||||
// =============================================================================================
|
// =============================================================================================
|
||||||
|
|||||||
@@ -2,27 +2,20 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
const { AppConstants } = ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
"resource://gre/modules/AppConstants.sys.mjs"
|
||||||
);
|
|
||||||
|
|
||||||
const { AppConstants } = ChromeUtils.import(
|
|
||||||
"resource://gre/modules/AppConstants.jsm"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
DownloadLastDir: "resource://gre/modules/DownloadLastDir.sys.mjs",
|
DownloadLastDir: "resource://gre/modules/DownloadLastDir.sys.mjs",
|
||||||
|
DownloadPaths: "resource://gre/modules/DownloadPaths.sys.mjs",
|
||||||
|
Downloads: "resource://gre/modules/Downloads.sys.mjs",
|
||||||
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
|
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
|
||||||
ScreenshotsUtils: "resource:///modules/ScreenshotsUtils.sys.mjs",
|
ScreenshotsUtils: "resource:///modules/ScreenshotsUtils.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|
||||||
Downloads: "resource://gre/modules/Downloads.jsm",
|
|
||||||
DownloadPaths: "resource://gre/modules/DownloadPaths.jsm",
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the filename automatically or by a file picker depending on "browser.download.useDownloadDir"
|
* Gets the filename automatically or by a file picker depending on "browser.download.useDownloadDir"
|
||||||
* @param filenameTitle The title of the current page
|
* @param filenameTitle The title of the current page
|
||||||
|
|||||||
@@ -316,8 +316,8 @@ class ScreenshotsHelper {
|
|||||||
|
|
||||||
async zoomBrowser(zoom) {
|
async zoomBrowser(zoom) {
|
||||||
await SpecialPowers.spawn(this.browser, [zoom], zoomLevel => {
|
await SpecialPowers.spawn(this.browser, [zoom], zoomLevel => {
|
||||||
const { Layout } = ChromeUtils.import(
|
const { Layout } = ChromeUtils.importESModule(
|
||||||
"chrome://mochitests/content/browser/accessible/tests/browser/Layout.jsm"
|
"chrome://mochitests/content/browser/accessible/tests/browser/Layout.sys.mjs"
|
||||||
);
|
);
|
||||||
Layout.zoomDocument(content.document, zoomLevel);
|
Layout.zoomDocument(content.document, zoomLevel);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
// Test whether a visit information is annotated correctly when searching on searchbar.
|
// Test whether a visit information is annotated correctly when searching on searchbar.
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
ChromeUtils.defineESModuleGetters(this, {
|
||||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.jsm",
|
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
const FRECENCY = {
|
const FRECENCY = {
|
||||||
|
|||||||
@@ -2,9 +2,8 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.import(
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
"resource://gre/modules/XPCOMUtils.jsm"
|
|
||||||
);
|
|
||||||
import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
|
import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|||||||
@@ -2,9 +2,7 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.import(
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
"resource://gre/modules/XPCOMUtils.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
UrlbarProvider,
|
UrlbarProvider,
|
||||||
@@ -14,6 +12,7 @@ import {
|
|||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
|
OpenSearchEngine: "resource://gre/modules/OpenSearchEngine.sys.mjs",
|
||||||
UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs",
|
UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs",
|
||||||
UrlbarResult: "resource:///modules/UrlbarResult.sys.mjs",
|
UrlbarResult: "resource:///modules/UrlbarResult.sys.mjs",
|
||||||
UrlbarSearchUtils: "resource:///modules/UrlbarSearchUtils.sys.mjs",
|
UrlbarSearchUtils: "resource:///modules/UrlbarSearchUtils.sys.mjs",
|
||||||
@@ -22,7 +21,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||||
OpenSearchEngine: "resource://gre/modules/OpenSearchEngine.jsm",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const DYNAMIC_RESULT_TYPE = "contextualSearch";
|
const DYNAMIC_RESULT_TYPE = "contextualSearch";
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||||||
NLP: "resource://gre/modules/NLP.sys.mjs",
|
NLP: "resource://gre/modules/NLP.sys.mjs",
|
||||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||||
ResetProfile: "resource://gre/modules/ResetProfile.sys.mjs",
|
ResetProfile: "resource://gre/modules/ResetProfile.sys.mjs",
|
||||||
|
Sanitizer: "resource:///modules/Sanitizer.sys.mjs",
|
||||||
UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs",
|
UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs",
|
||||||
UrlbarResult: "resource:///modules/UrlbarResult.sys.mjs",
|
UrlbarResult: "resource:///modules/UrlbarResult.sys.mjs",
|
||||||
UrlbarTokenizer: "resource:///modules/UrlbarTokenizer.sys.mjs",
|
UrlbarTokenizer: "resource:///modules/UrlbarTokenizer.sys.mjs",
|
||||||
@@ -23,7 +24,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||||
Sanitizer: "resource:///modules/Sanitizer.jsm",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyGetter(lazy, "appUpdater", () => new lazy.AppUpdater());
|
XPCOMUtils.defineLazyGetter(lazy, "appUpdater", () => new lazy.AppUpdater());
|
||||||
|
|||||||
@@ -7,9 +7,9 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
ChromeUtils.defineESModuleGetters(this, {
|
||||||
CONTEXTUAL_SERVICES_PING_TYPES:
|
CONTEXTUAL_SERVICES_PING_TYPES:
|
||||||
"resource:///modules/PartnerLinkAttribution.jsm",
|
"resource:///modules/PartnerLinkAttribution.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
const { TELEMETRY_SCALARS } = UrlbarProviderQuickSuggest;
|
const { TELEMETRY_SCALARS } = UrlbarProviderQuickSuggest;
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ const { AddressComparison, AddressComponent } = ChromeUtils.importESModule(
|
|||||||
"resource://gre/modules/shared/AddressComponent.sys.mjs"
|
"resource://gre/modules/shared/AddressComponent.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
const { FormAutofill } = ChromeUtils.import(
|
const { FormAutofill } = ChromeUtils.importESModule(
|
||||||
"resource://autofill/FormAutofill.jsm"
|
"resource://autofill/FormAutofill.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
const BOTH_EMPTY = AddressComparison.BOTH_EMPTY;
|
const BOTH_EMPTY = AddressComparison.BOTH_EMPTY;
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ Services.scriptloader.loadSubScript(
|
|||||||
this
|
this
|
||||||
);
|
);
|
||||||
|
|
||||||
const { BackgroundTasksTestUtils } = ChromeUtils.import(
|
const { BackgroundTasksTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/BackgroundTasksTestUtils.jsm"
|
"resource://testing-common/BackgroundTasksTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
BackgroundTasksTestUtils.init(this);
|
BackgroundTasksTestUtils.init(this);
|
||||||
const do_backgroundtask = BackgroundTasksTestUtils.do_backgroundtask.bind(
|
const do_backgroundtask = BackgroundTasksTestUtils.do_backgroundtask.bind(
|
||||||
|
|||||||
@@ -20,12 +20,8 @@ import { Subprocess } from "resource://gre/modules/Subprocess.sys.mjs";
|
|||||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
ChromeUtils.defineModuleGetter(
|
|
||||||
lazy,
|
|
||||||
"BackgroundTasksUtils",
|
|
||||||
"resource://gre/modules/BackgroundTasksUtils.jsm"
|
|
||||||
);
|
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
|
BackgroundTasksUtils: "resource://gre/modules/BackgroundTasksUtils.sys.mjs",
|
||||||
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
|
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { SiteDataTestUtils } = ChromeUtils.import(
|
const { SiteDataTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/SiteDataTestUtils.jsm"
|
"resource://testing-common/SiteDataTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
// Ensure iframe.src in storage-dfpi.html starts with PREFIX.
|
// Ensure iframe.src in storage-dfpi.html starts with PREFIX.
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { SiteDataTestUtils } = ChromeUtils.import(
|
const { SiteDataTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/SiteDataTestUtils.jsm"
|
"resource://testing-common/SiteDataTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
// Ensure iframe.src in storage-dfpi.html starts with PREFIX.
|
// Ensure iframe.src in storage-dfpi.html starts with PREFIX.
|
||||||
|
|||||||
@@ -21,11 +21,9 @@ const {
|
|||||||
connectToFrame,
|
connectToFrame,
|
||||||
} = require("resource://devtools/server/connectors/frame-connector.js");
|
} = require("resource://devtools/server/connectors/frame-connector.js");
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
ChromeUtils.defineModuleGetter(
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
lazy,
|
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||||
"PlacesUtils",
|
});
|
||||||
"resource://gre/modules/PlacesUtils.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
const { AppConstants } = ChromeUtils.importESModule(
|
const { AppConstants } = ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/AppConstants.sys.mjs"
|
"resource://gre/modules/AppConstants.sys.mjs"
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ add_task(async function () {
|
|||||||
const { require } = ChromeUtils.importESModule(
|
const { require } = ChromeUtils.importESModule(
|
||||||
"resource://devtools/shared/loader/Loader.sys.mjs"
|
"resource://devtools/shared/loader/Loader.sys.mjs"
|
||||||
);
|
);
|
||||||
const { TargetActorRegistry } = ChromeUtils.import(
|
const { TargetActorRegistry } = ChromeUtils.importESModule(
|
||||||
"resource://devtools/server/actors/targets/target-actor-registry.jsm"
|
"resource://devtools/server/actors/targets/target-actor-registry.sys.mjs"
|
||||||
);
|
);
|
||||||
const {
|
const {
|
||||||
getResourceWatcher,
|
getResourceWatcher,
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
function getSandboxWithDebuggerSymbol() {
|
function getSandboxWithDebuggerSymbol() {
|
||||||
|
// Bug 1835268 - Changing this to an ES module import currently throws an
|
||||||
|
// assertion in test_javascript_tracer.js in debug builds.
|
||||||
const { addDebuggerToGlobal } = ChromeUtils.import(
|
const { addDebuggerToGlobal } = ChromeUtils.import(
|
||||||
"resource://gre/modules/jsdebugger.jsm"
|
"resource://gre/modules/jsdebugger.jsm"
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
const { AppConstants } = SpecialPowers.ChromeUtils.import(
|
const { AppConstants } = SpecialPowers.ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/AppConstants.jsm"
|
"resource://gre/modules/AppConstants.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
// In each list of tests below, test file types that are not supported should
|
// In each list of tests below, test file types that are not supported should
|
||||||
|
|||||||
@@ -2481,8 +2481,8 @@ var setupIceServerConfig = useIceServer => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
async function runNetworkTest(testFunction, fixtureOptions = {}) {
|
async function runNetworkTest(testFunction, fixtureOptions = {}) {
|
||||||
let { AppConstants } = SpecialPowers.ChromeUtils.import(
|
let { AppConstants } = SpecialPowers.ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/AppConstants.jsm"
|
"resource://gre/modules/AppConstants.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
await scriptsReady;
|
await scriptsReady;
|
||||||
|
|||||||
@@ -77,8 +77,8 @@ var checkResult = async function (isRemote, browserKey, uri) {
|
|||||||
sessionHistory.count - 1
|
sessionHistory.count - 1
|
||||||
);
|
);
|
||||||
|
|
||||||
var { E10SUtils } = SpecialPowers.ChromeUtils.import(
|
var { E10SUtils } = SpecialPowers.ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/E10SUtils.jsm"
|
"resource://gre/modules/E10SUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
Assert.equal(entry.URI.spec, args.uri, "Uri should be correct");
|
Assert.equal(entry.URI.spec, args.uri, "Uri should be correct");
|
||||||
|
|||||||
@@ -32,8 +32,8 @@
|
|||||||
// channel/OS) or one of the is* constants below (in cases when
|
// channel/OS) or one of the is* constants below (in cases when
|
||||||
// exposure is affected by channel or OS in a nontrivial way).
|
// exposure is affected by channel or OS in a nontrivial way).
|
||||||
|
|
||||||
const { AppConstants } = SpecialPowers.ChromeUtils.import(
|
const { AppConstants } = SpecialPowers.ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/AppConstants.jsm"
|
"resource://gre/modules/AppConstants.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
const isNightly = AppConstants.NIGHTLY_BUILD;
|
const isNightly = AppConstants.NIGHTLY_BUILD;
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ const cose_crv_P256 = 1;
|
|||||||
const cose_crv_x = -2;
|
const cose_crv_x = -2;
|
||||||
const cose_crv_y = -3;
|
const cose_crv_y = -3;
|
||||||
|
|
||||||
var { AppConstants } = SpecialPowers.ChromeUtils.import(
|
var { AppConstants } = SpecialPowers.ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/AppConstants.jsm"
|
"resource://gre/modules/AppConstants.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
function handleEventMessage(event) {
|
function handleEventMessage(event) {
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ worker.onerror = function (event) {
|
|||||||
SimpleTest.finish();
|
SimpleTest.finish();
|
||||||
};
|
};
|
||||||
|
|
||||||
var { AppConstants } = SpecialPowers.ChromeUtils.import(
|
var { AppConstants } = SpecialPowers.ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/AppConstants.jsm"
|
"resource://gre/modules/AppConstants.sys.mjs"
|
||||||
);
|
);
|
||||||
var isNightly = AppConstants.NIGHTLY_BUILD;
|
var isNightly = AppConstants.NIGHTLY_BUILD;
|
||||||
var isRelease = AppConstants.RELEASE_OR_BETA;
|
var isRelease = AppConstants.RELEASE_OR_BETA;
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ function workerTestExec(script) {
|
|||||||
} else if (event.data.type == "status") {
|
} else if (event.data.type == "status") {
|
||||||
ok(event.data.status, event.data.msg);
|
ok(event.data.status, event.data.msg);
|
||||||
} else if (event.data.type == "getHelperData") {
|
} else if (event.data.type == "getHelperData") {
|
||||||
const { AppConstants } = SpecialPowers.ChromeUtils.import(
|
const { AppConstants } = SpecialPowers.ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/AppConstants.jsm"
|
"resource://gre/modules/AppConstants.sys.mjs"
|
||||||
);
|
);
|
||||||
const isNightly = AppConstants.NIGHTLY_BUILD;
|
const isNightly = AppConstants.NIGHTLY_BUILD;
|
||||||
const isEarlyBetaOrEarlier = AppConstants.EARLY_BETA_OR_EARLIER;
|
const isEarlyBetaOrEarlier = AppConstants.EARLY_BETA_OR_EARLIER;
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
|
|
||||||
const { TestUtils } = ChromeUtils.import(
|
const { TestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/TestUtils.jsm"
|
"resource://testing-common/TestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
const { AddonTestUtils } = ChromeUtils.import(
|
const { AddonTestUtils } = ChromeUtils.import(
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/* Any copyright is dedicated to the Public Domain.
|
/* Any copyright is dedicated to the Public Domain.
|
||||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||||
|
|
||||||
const { AppConstants } = ChromeUtils.import(
|
const { AppConstants } = ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/AppConstants.jsm"
|
"resource://gre/modules/AppConstants.sys.mjs"
|
||||||
);
|
);
|
||||||
const { addDebuggerToGlobal } = ChromeUtils.importESModule(
|
const { addDebuggerToGlobal } = ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/jsdebugger.sys.mjs"
|
"resource://gre/modules/jsdebugger.sys.mjs"
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
/* exported assertPersistentListeners, AppConstants, TEST_ICON_ARRAYBUFFER */
|
/* exported assertPersistentListeners, AppConstants, TEST_ICON_ARRAYBUFFER */
|
||||||
|
|
||||||
var { AppConstants } = SpecialPowers.ChromeUtils.import(
|
var { AppConstants } = SpecialPowers.ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/AppConstants.jsm"
|
"resource://gre/modules/AppConstants.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
var TEST_ICON_DATA =
|
var TEST_ICON_DATA =
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
// Load a web page containing an iframe that requires authentication but includes the X-Frame-Options: SAMEORIGIN header.
|
// Load a web page containing an iframe that requires authentication but includes the X-Frame-Options: SAMEORIGIN header.
|
||||||
// Make sure that we don't needlessly show an authentication prompt for it.
|
// Make sure that we don't needlessly show an authentication prompt for it.
|
||||||
|
|
||||||
const { PromptTestUtils } = ChromeUtils.import(
|
const { PromptTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/PromptTestUtils.jsm"
|
"resource://testing-common/PromptTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
add_task(async function () {
|
add_task(async function () {
|
||||||
|
|||||||
@@ -3,7 +3,9 @@
|
|||||||
// In an SJS file we need to get the setTimeout bits ourselves, despite
|
// In an SJS file we need to get the setTimeout bits ourselves, despite
|
||||||
// what eslint might think applies for browser tests.
|
// what eslint might think applies for browser tests.
|
||||||
// eslint-disable-next-line mozilla/no-redeclare-with-import-autofix
|
// eslint-disable-next-line mozilla/no-redeclare-with-import-autofix
|
||||||
let { setTimeout } = ChromeUtils.import("resource://gre/modules/Timer.jsm");
|
let { setTimeout } = ChromeUtils.importESModule(
|
||||||
|
"resource://gre/modules/Timer.sys.mjs"
|
||||||
|
);
|
||||||
|
|
||||||
async function handleRequest(request, response) {
|
async function handleRequest(request, response) {
|
||||||
let hinted =
|
let hinted =
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ var DEBUG = false; // non-const *only* so tweakable in server tests
|
|||||||
/** True if debugging output should be timestamped. */
|
/** True if debugging output should be timestamped. */
|
||||||
var DEBUG_TIMESTAMP = false; // non-const so tweakable in server tests
|
var DEBUG_TIMESTAMP = false; // non-const so tweakable in server tests
|
||||||
|
|
||||||
const { AppConstants } = ChromeUtils.import(
|
const { AppConstants } = ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/AppConstants.jsm"
|
"resource://gre/modules/AppConstants.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ function handlerCount(path) {
|
|||||||
return handlerCallbacks[path] || 0;
|
return handlerCallbacks[path] || 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
ChromeUtils.importESModule("resource://gre/modules/AppConstants.sys.mjs");
|
||||||
|
|
||||||
// Bug 1805371: Tests that require FaultyServer can't currently be built
|
// Bug 1805371: Tests that require FaultyServer can't currently be built
|
||||||
// with system NSS.
|
// with system NSS.
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ Services.prefs.setBoolPref(
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
const { TelemetryTestUtils } = ChromeUtils.import(
|
const { TelemetryTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/TelemetryTestUtils.jsm"
|
"resource://testing-common/TelemetryTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
function setup() {
|
function setup() {
|
||||||
|
|||||||
@@ -7,13 +7,10 @@
|
|||||||
// service data on shutdown if configured to do so.
|
// service data on shutdown if configured to do so.
|
||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(this, {
|
ChromeUtils.defineESModuleGetters(this, {
|
||||||
|
Sanitizer: "resource:///modules/Sanitizer.sys.mjs",
|
||||||
TestUtils: "resource://testing-common/TestUtils.sys.mjs",
|
TestUtils: "resource://testing-common/TestUtils.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
|
||||||
Sanitizer: "resource:///modules/Sanitizer.jsm",
|
|
||||||
});
|
|
||||||
|
|
||||||
Sanitizer.onStartup();
|
Sanitizer.onStartup();
|
||||||
|
|
||||||
// This helps us away from test timed out. If service worker manager(swm) hasn't
|
// This helps us away from test timed out. If service worker manager(swm) hasn't
|
||||||
|
|||||||
@@ -12,14 +12,11 @@ const lazy = {};
|
|||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
AsyncShutdown: "resource://gre/modules/AsyncShutdown.sys.mjs",
|
AsyncShutdown: "resource://gre/modules/AsyncShutdown.sys.mjs",
|
||||||
Log: "resource://gre/modules/Log.sys.mjs",
|
Log: "resource://gre/modules/Log.sys.mjs",
|
||||||
|
Sanitizer: "resource:///modules/Sanitizer.sys.mjs",
|
||||||
Utils: "resource://services-sync/util.sys.mjs",
|
Utils: "resource://services-sync/util.sys.mjs",
|
||||||
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|
||||||
Sanitizer: "resource:///modules/Sanitizer.jsm",
|
|
||||||
});
|
|
||||||
|
|
||||||
XPCOMUtils.defineLazyGetter(lazy, "fxAccounts", () => {
|
XPCOMUtils.defineLazyGetter(lazy, "fxAccounts", () => {
|
||||||
return ChromeUtils.importESModule(
|
return ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/FxAccounts.sys.mjs"
|
"resource://gre/modules/FxAccounts.sys.mjs"
|
||||||
|
|||||||
@@ -11,13 +11,13 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||||||
HiddenFrame: "resource://gre/modules/HiddenFrame.sys.mjs",
|
HiddenFrame: "resource://gre/modules/HiddenFrame.sys.mjs",
|
||||||
PerTestCoverageUtils:
|
PerTestCoverageUtils:
|
||||||
"resource://testing-common/PerTestCoverageUtils.sys.mjs",
|
"resource://testing-common/PerTestCoverageUtils.sys.mjs",
|
||||||
|
ServiceWorkerCleanUp: "resource://gre/modules/ServiceWorkerCleanUp.sys.mjs",
|
||||||
SpecialPowersSandbox: "resource://specialpowers/SpecialPowersSandbox.sys.mjs",
|
SpecialPowersSandbox: "resource://specialpowers/SpecialPowersSandbox.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||||
ExtensionData: "resource://gre/modules/Extension.jsm",
|
ExtensionData: "resource://gre/modules/Extension.jsm",
|
||||||
ExtensionTestCommon: "resource://testing-common/ExtensionTestCommon.jsm",
|
ExtensionTestCommon: "resource://testing-common/ExtensionTestCommon.jsm",
|
||||||
ServiceWorkerCleanUp: "resource://gre/modules/ServiceWorkerCleanUp.jsm",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
class SpecialPowersError extends Error {
|
class SpecialPowersError extends Error {
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
* we clear storage under the correct partition.
|
* we clear storage under the correct partition.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const { SiteDataTestUtils } = ChromeUtils.import(
|
const { SiteDataTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/SiteDataTestUtils.jsm"
|
"resource://testing-common/SiteDataTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
const HOST_A = "example.com";
|
const HOST_A = "example.com";
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ const FOREIGN_PAGE3 = "https://example.net^partitionKey=(https,example.org)";
|
|||||||
const { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
const { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
const { SiteDataTestUtils } = ChromeUtils.import(
|
const { SiteDataTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/SiteDataTestUtils.jsm"
|
"resource://testing-common/SiteDataTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
const { PermissionTestUtils } = ChromeUtils.importESModule(
|
const { PermissionTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/PermissionTestUtils.sys.mjs"
|
"resource://testing-common/PermissionTestUtils.sys.mjs"
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ const BENIGN_PAGE = "https://example.com";
|
|||||||
const { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
const { UrlClassifierTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
"resource://testing-common/UrlClassifierTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
const { SiteDataTestUtils } = ChromeUtils.import(
|
const { SiteDataTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/SiteDataTestUtils.jsm"
|
"resource://testing-common/SiteDataTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
const { PermissionTestUtils } = ChromeUtils.importESModule(
|
const { PermissionTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/PermissionTestUtils.sys.mjs"
|
"resource://testing-common/PermissionTestUtils.sys.mjs"
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
// This test exercises functionality and also ensures the exit codes,
|
// This test exercises functionality and also ensures the exit codes,
|
||||||
// which are a public API, do not change over time.
|
// which are a public API, do not change over time.
|
||||||
const { EXIT_CODE } = ChromeUtils.import(
|
const { EXIT_CODE } = ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/BackgroundTasksManager.jsm"
|
"resource://gre/modules/BackgroundTasksManager.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
const LEAF_NAME = "newCacheFolder";
|
const LEAF_NAME = "newCacheFolder";
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { SiteDataTestUtils } = ChromeUtils.import(
|
const { SiteDataTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/SiteDataTestUtils.jsm"
|
"resource://testing-common/SiteDataTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
const { MODE_DISABLED, MODE_REJECT, MODE_REJECT_OR_ACCEPT, MODE_UNSET } =
|
const { MODE_DISABLED, MODE_REJECT, MODE_REJECT_OR_ACCEPT, MODE_UNSET } =
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { SiteDataTestUtils } = ChromeUtils.import(
|
const { SiteDataTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/SiteDataTestUtils.jsm"
|
"resource://testing-common/SiteDataTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
const DOMAIN_A = "example.com";
|
const DOMAIN_A = "example.com";
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { SiteDataTestUtils } = ChromeUtils.import(
|
const { SiteDataTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/SiteDataTestUtils.jsm"
|
"resource://testing-common/SiteDataTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
add_setup(cookieInjectorTestSetup);
|
add_setup(cookieInjectorTestSetup);
|
||||||
|
|||||||
@@ -4,6 +4,6 @@
|
|||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
const { TestUtils } = ChromeUtils.import(
|
const { TestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/TestUtils.jsm"
|
"resource://testing-common/TestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||||||
"resource://gre/modules/ExtensionPermissionMessages.sys.mjs",
|
"resource://gre/modules/ExtensionPermissionMessages.sys.mjs",
|
||||||
SITEPERMS_ADDON_TYPE:
|
SITEPERMS_ADDON_TYPE:
|
||||||
"resource://gre/modules/addons/siteperms-addon-utils.sys.mjs",
|
"resource://gre/modules/addons/siteperms-addon-utils.sys.mjs",
|
||||||
|
ServiceWorkerCleanUp: "resource://gre/modules/ServiceWorkerCleanUp.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||||
@@ -78,7 +79,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||||||
LightweightThemeManager: "resource://gre/modules/LightweightThemeManager.jsm",
|
LightweightThemeManager: "resource://gre/modules/LightweightThemeManager.jsm",
|
||||||
NetUtil: "resource://gre/modules/NetUtil.jsm",
|
NetUtil: "resource://gre/modules/NetUtil.jsm",
|
||||||
Schemas: "resource://gre/modules/Schemas.jsm",
|
Schemas: "resource://gre/modules/Schemas.jsm",
|
||||||
ServiceWorkerCleanUp: "resource://gre/modules/ServiceWorkerCleanUp.jsm",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyGetter(lazy, "resourceProtocol", () =>
|
XPCOMUtils.defineLazyGetter(lazy, "resourceProtocol", () =>
|
||||||
|
|||||||
@@ -17,13 +17,13 @@ const lazy = {};
|
|||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||||
Extension: "resource://gre/modules/Extension.jsm",
|
Extension: "resource://gre/modules/Extension.jsm",
|
||||||
Schemas: "resource://gre/modules/Schemas.jsm",
|
Schemas: "resource://gre/modules/Schemas.jsm",
|
||||||
PromiseUtils: "resource://gre/modules/PromiseUtils.jsm",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
DeferredTask: "resource://gre/modules/DeferredTask.sys.mjs",
|
DeferredTask: "resource://gre/modules/DeferredTask.sys.mjs",
|
||||||
ExtensionDNR: "resource://gre/modules/ExtensionDNR.sys.mjs",
|
ExtensionDNR: "resource://gre/modules/ExtensionDNR.sys.mjs",
|
||||||
ExtensionDNRLimits: "resource://gre/modules/ExtensionDNRLimits.sys.mjs",
|
ExtensionDNRLimits: "resource://gre/modules/ExtensionDNRLimits.sys.mjs",
|
||||||
|
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyServiceGetters(lazy, {
|
XPCOMUtils.defineLazyServiceGetters(lazy, {
|
||||||
|
|||||||
@@ -6,11 +6,11 @@
|
|||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(this, {
|
ChromeUtils.defineESModuleGetters(this, {
|
||||||
LoginHelper: "resource://gre/modules/LoginHelper.sys.mjs",
|
LoginHelper: "resource://gre/modules/LoginHelper.sys.mjs",
|
||||||
|
ServiceWorkerCleanUp: "resource://gre/modules/ServiceWorkerCleanUp.sys.mjs",
|
||||||
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||||
ServiceWorkerCleanUp: "resource://gre/modules/ServiceWorkerCleanUp.jsm",
|
|
||||||
// This helper contains the platform-specific bits of browsingData.
|
// This helper contains the platform-specific bits of browsingData.
|
||||||
BrowsingDataDelegate: "resource:///modules/ExtensionBrowsingData.jsm",
|
BrowsingDataDelegate: "resource:///modules/ExtensionBrowsingData.jsm",
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
/* exported AppConstants, Assert, AppTestDelegate */
|
/* exported AppConstants, Assert, AppTestDelegate */
|
||||||
|
|
||||||
var { AppConstants } = SpecialPowers.ChromeUtils.import(
|
var { AppConstants } = SpecialPowers.ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/AppConstants.jsm"
|
"resource://gre/modules/AppConstants.sys.mjs"
|
||||||
);
|
);
|
||||||
var { AppTestDelegate } = SpecialPowers.ChromeUtils.importESModule(
|
var { AppTestDelegate } = SpecialPowers.ChromeUtils.importESModule(
|
||||||
"resource://specialpowers/AppTestDelegate.sys.mjs"
|
"resource://specialpowers/AppTestDelegate.sys.mjs"
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
/* eslint-disable mozilla/no-arbitrary-setTimeout */
|
/* eslint-disable mozilla/no-arbitrary-setTimeout */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { SiteDataTestUtils } = ChromeUtils.import(
|
const { SiteDataTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/SiteDataTestUtils.jsm"
|
"resource://testing-common/SiteDataTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
const COOKIE = {
|
const COOKIE = {
|
||||||
|
|||||||
@@ -3,11 +3,9 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
ChromeUtils.defineModuleGetter(
|
ChromeUtils.defineESModuleGetters(this, {
|
||||||
this,
|
Sanitizer: "resource:///modules/Sanitizer.sys.mjs",
|
||||||
"Sanitizer",
|
});
|
||||||
"resource:///modules/Sanitizer.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
async function test_sanitize_offlineApps(storageHelpersScript) {
|
async function test_sanitize_offlineApps(storageHelpersScript) {
|
||||||
const extension = ExtensionTestUtils.loadExtension({
|
const extension = ExtensionTestUtils.loadExtension({
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
const { ForgetAboutSite } = ChromeUtils.importESModule(
|
const { ForgetAboutSite } = ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/ForgetAboutSite.sys.mjs"
|
"resource://gre/modules/ForgetAboutSite.sys.mjs"
|
||||||
);
|
);
|
||||||
const { SiteDataTestUtils } = ChromeUtils.import(
|
const { SiteDataTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/SiteDataTestUtils.jsm"
|
"resource://testing-common/SiteDataTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
function checkCookie(host, originAttributes) {
|
function checkCookie(host, originAttributes) {
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ const { ExperimentFakes, ExperimentTestUtils } = ChromeUtils.importESModule(
|
|||||||
const { TelemetryTestUtils } = ChromeUtils.importESModule(
|
const { TelemetryTestUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/TelemetryTestUtils.sys.mjs"
|
"resource://testing-common/TelemetryTestUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
const { TelemetryEvents } = ChromeUtils.import(
|
const { TelemetryEvents } = ChromeUtils.importESModule(
|
||||||
"resource://normandy/lib/TelemetryEvents.jsm"
|
"resource://normandy/lib/TelemetryEvents.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
const LOCALIZATIONS = {
|
const LOCALIZATIONS = {
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ const { ExperimentFakes } = ChromeUtils.importESModule(
|
|||||||
const { RecipeRunner } = ChromeUtils.importESModule(
|
const { RecipeRunner } = ChromeUtils.importESModule(
|
||||||
"resource://normandy/lib/RecipeRunner.sys.mjs"
|
"resource://normandy/lib/RecipeRunner.sys.mjs"
|
||||||
);
|
);
|
||||||
const { RemoteSettings } = ChromeUtils.import(
|
const { RemoteSettings } = ChromeUtils.importESModule(
|
||||||
"resource://services-settings/remote-settings.js"
|
"resource://services-settings/remote-settings.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
const SURVEY = {
|
const SURVEY = {
|
||||||
|
|||||||
@@ -10,9 +10,7 @@ import {
|
|||||||
} from "resource://gre/modules/LoginHelper.sys.mjs";
|
} from "resource://gre/modules/LoginHelper.sys.mjs";
|
||||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
|
|
||||||
const { TelemetryUtils } = ChromeUtils.import(
|
import { TelemetryUtils } from "resource://gre/modules/TelemetryUtils.sys.mjs";
|
||||||
"resource://gre/modules/TelemetryUtils.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
const { ChromeMigrationUtils } = ChromeUtils.import(
|
const { ChromeMigrationUtils } = ChromeUtils.importESModule(
|
||||||
"resource:///modules/ChromeMigrationUtils.jsm"
|
"resource:///modules/ChromeMigrationUtils.sys.mjs"
|
||||||
);
|
);
|
||||||
const { ExperimentAPI } = ChromeUtils.importESModule(
|
const { ExperimentAPI } = ChromeUtils.importESModule(
|
||||||
"resource://nimbus/ExperimentAPI.sys.mjs"
|
"resource://nimbus/ExperimentAPI.sys.mjs"
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ const { sinon } = ChromeUtils.importESModule(
|
|||||||
"resource://testing-common/Sinon.sys.mjs"
|
"resource://testing-common/Sinon.sys.mjs"
|
||||||
);
|
);
|
||||||
const { HttpServer } = ChromeUtils.import("resource://testing-common/httpd.js");
|
const { HttpServer } = ChromeUtils.import("resource://testing-common/httpd.js");
|
||||||
const { getFxAccountsSingleton } = ChromeUtils.import(
|
const { getFxAccountsSingleton } = ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/FxAccounts.jsm"
|
"resource://gre/modules/FxAccounts.sys.mjs"
|
||||||
);
|
);
|
||||||
const { FirefoxRelayTelemetry } = ChromeUtils.importESModule(
|
const { FirefoxRelayTelemetry } = ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/FirefoxRelayTelemetry.mjs"
|
"resource://gre/modules/FirefoxRelayTelemetry.mjs"
|
||||||
|
|||||||
@@ -7,16 +7,11 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
|||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
|
FormHistory: "resource://gre/modules/FormHistory.sys.mjs",
|
||||||
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
|
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
|
||||||
SearchUtils: "resource://gre/modules/SearchUtils.sys.mjs",
|
SearchUtils: "resource://gre/modules/SearchUtils.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
ChromeUtils.defineModuleGetter(
|
|
||||||
lazy,
|
|
||||||
"FormHistory",
|
|
||||||
"resource://gre/modules/FormHistory.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
const DEFAULT_FORM_HISTORY_PARAM = "searchbar-history";
|
const DEFAULT_FORM_HISTORY_PARAM = "searchbar-history";
|
||||||
const HTTP_OK = 200;
|
const HTTP_OK = 200;
|
||||||
const BROWSER_SUGGEST_PREF = "browser.search.suggest.enabled";
|
const BROWSER_SUGGEST_PREF = "browser.search.suggest.enabled";
|
||||||
|
|||||||
@@ -6,19 +6,12 @@ import { FormAutoCompleteResult } from "resource://gre/modules/nsFormAutoComplet
|
|||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
|
FormAutoCompleteResult: "resource://gre/modules/FormAutoComplete.sys.mjs",
|
||||||
|
FormHistoryClient: "resource://gre/modules/FormAutoComplete.sys.mjs",
|
||||||
|
|
||||||
SearchSuggestionController:
|
SearchSuggestionController:
|
||||||
"resource://gre/modules/SearchSuggestionController.sys.mjs",
|
"resource://gre/modules/SearchSuggestionController.sys.mjs",
|
||||||
});
|
});
|
||||||
ChromeUtils.defineModuleGetter(
|
|
||||||
lazy,
|
|
||||||
"FormHistoryClient",
|
|
||||||
"resource://gre/modules/FormAutoComplete.jsm"
|
|
||||||
);
|
|
||||||
ChromeUtils.defineModuleGetter(
|
|
||||||
lazy,
|
|
||||||
"FormAutoCompleteResult",
|
|
||||||
"resource://gre/modules/FormAutoComplete.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SuggestAutoComplete is a base class that implements nsIAutoCompleteSearch
|
* SuggestAutoComplete is a base class that implements nsIAutoCompleteSearch
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
http://creativecommons.org/publicdomain/zero/1.0/
|
http://creativecommons.org/publicdomain/zero/1.0/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const { TelemetryController } = ChromeUtils.import(
|
const { TelemetryController } = ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/TelemetryController.jsm"
|
"resource://gre/modules/TelemetryController.sys.mjs"
|
||||||
);
|
);
|
||||||
const { ContentTaskUtils } = ChromeUtils.importESModule(
|
const { ContentTaskUtils } = ChromeUtils.importESModule(
|
||||||
"resource://testing-common/ContentTaskUtils.sys.mjs"
|
"resource://testing-common/ContentTaskUtils.sys.mjs"
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
* @typedef {import("../../translations").TranslationModelRecord} TranslationModelRecord
|
* @typedef {import("../../translations").TranslationModelRecord} TranslationModelRecord
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const { RemoteSettings } = ChromeUtils.import(
|
const { RemoteSettings } = ChromeUtils.importESModule(
|
||||||
"resource://services-settings/remote-settings.js"
|
"resource://services-settings/remote-settings.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
// The full Firefox version string.
|
// The full Firefox version string.
|
||||||
|
|||||||
@@ -634,8 +634,8 @@ async function createTranslationModelsRemoteClient(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const { RemoteSettings } = ChromeUtils.import(
|
const { RemoteSettings } = ChromeUtils.importESModule(
|
||||||
"resource://services-settings/remote-settings.js"
|
"resource://services-settings/remote-settings.sys.mjs"
|
||||||
);
|
);
|
||||||
const client = RemoteSettings("test-translation-models");
|
const client = RemoteSettings("test-translation-models");
|
||||||
const metadata = {};
|
const metadata = {};
|
||||||
@@ -662,8 +662,8 @@ async function createTranslationsWasmRemoteClient(
|
|||||||
schema: Date.now(),
|
schema: Date.now(),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const { RemoteSettings } = ChromeUtils.import(
|
const { RemoteSettings } = ChromeUtils.importESModule(
|
||||||
"resource://services-settings/remote-settings.js"
|
"resource://services-settings/remote-settings.sys.mjs"
|
||||||
);
|
);
|
||||||
const client = RemoteSettings("test-translations-wasm");
|
const client = RemoteSettings("test-translations-wasm");
|
||||||
const metadata = {};
|
const metadata = {};
|
||||||
@@ -692,8 +692,8 @@ async function createLanguageIdModelsRemoteClient(
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const { RemoteSettings } = ChromeUtils.import(
|
const { RemoteSettings } = ChromeUtils.importESModule(
|
||||||
"resource://services-settings/remote-settings.js"
|
"resource://services-settings/remote-settings.sys.mjs"
|
||||||
);
|
);
|
||||||
const client = RemoteSettings("test-language-id-models");
|
const client = RemoteSettings("test-language-id-models");
|
||||||
const metadata = {};
|
const metadata = {};
|
||||||
|
|||||||
@@ -17,15 +17,10 @@ const { AppConstants } = ChromeUtils.importESModule(
|
|||||||
ChromeUtils.defineESModuleGetters(this, {
|
ChromeUtils.defineESModuleGetters(this, {
|
||||||
DownloadUtils: "resource://gre/modules/DownloadUtils.sys.mjs",
|
DownloadUtils: "resource://gre/modules/DownloadUtils.sys.mjs",
|
||||||
PlacesDBUtils: "resource://gre/modules/PlacesDBUtils.sys.mjs",
|
PlacesDBUtils: "resource://gre/modules/PlacesDBUtils.sys.mjs",
|
||||||
|
PluralForm: "resource://gre/modules/PluralForm.sys.mjs",
|
||||||
ProcessType: "resource://gre/modules/ProcessType.sys.mjs",
|
ProcessType: "resource://gre/modules/ProcessType.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
ChromeUtils.defineModuleGetter(
|
|
||||||
this,
|
|
||||||
"PluralForm",
|
|
||||||
"resource://gre/modules/PluralForm.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
window.addEventListener("load", function onload(event) {
|
window.addEventListener("load", function onload(event) {
|
||||||
try {
|
try {
|
||||||
window.removeEventListener("load", onload);
|
window.removeEventListener("load", onload);
|
||||||
|
|||||||
Reference in New Issue
Block a user