зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1824906 - Update consumers to use normandy ESM. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D175026
This commit is contained in:
Родитель
283a25b463
Коммит
64cbc8d1e6
|
@ -38,6 +38,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
LoginBreaches: "resource:///modules/LoginBreaches.sys.mjs",
|
||||
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
|
||||
NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||
Normandy: "resource://normandy/Normandy.sys.mjs",
|
||||
OsEnvironment: "resource://gre/modules/OsEnvironment.sys.mjs",
|
||||
PageDataService: "resource:///modules/pagedata/PageDataService.sys.mjs",
|
||||
PdfJs: "resource://pdf.js/PdfJs.sys.mjs",
|
||||
|
@ -97,8 +98,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||
ExtensionsUI: "resource:///modules/ExtensionsUI.jsm",
|
||||
HomePage: "resource:///modules/HomePage.jsm",
|
||||
NetUtil: "resource://gre/modules/NetUtil.jsm",
|
||||
Normandy: "resource://normandy/Normandy.jsm",
|
||||
|
||||
OnboardingMessageProvider:
|
||||
"resource://activity-stream/lib/OnboardingMessageProvider.jsm",
|
||||
|
||||
|
@ -739,10 +738,10 @@ let JSWINDOWACTORS = {
|
|||
|
||||
ShieldFrame: {
|
||||
parent: {
|
||||
moduleURI: "resource://normandy-content/ShieldFrameParent.jsm",
|
||||
esModuleURI: "resource://normandy-content/ShieldFrameParent.sys.mjs",
|
||||
},
|
||||
child: {
|
||||
moduleURI: "resource://normandy-content/ShieldFrameChild.jsm",
|
||||
esModuleURI: "resource://normandy-content/ShieldFrameChild.sys.mjs",
|
||||
events: {
|
||||
pageshow: {},
|
||||
pagehide: {},
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
"use strict";
|
||||
|
||||
add_task(async function test_policy_disable_shield() {
|
||||
const { RecipeRunner } = ChromeUtils.import(
|
||||
"resource://normandy/lib/RecipeRunner.jsm"
|
||||
const { RecipeRunner } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/RecipeRunner.sys.mjs"
|
||||
);
|
||||
const { BaseAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseAction.jsm"
|
||||
const { BaseAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/BaseAction.sys.mjs"
|
||||
);
|
||||
const { BaseStudyAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseStudyAction.jsm"
|
||||
const { BaseStudyAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/BaseStudyAction.sys.mjs"
|
||||
);
|
||||
|
||||
const baseAction = new BaseAction();
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { AddonStudies } = ChromeUtils.import(
|
||||
"resource://normandy/lib/AddonStudies.jsm"
|
||||
const { AddonStudies } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/AddonStudies.sys.mjs"
|
||||
);
|
||||
const { ClientID } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/ClientID.sys.mjs"
|
||||
|
|
|
@ -6,11 +6,11 @@ ChromeUtils.defineModuleGetter(
|
|||
"resource://gre/modules/AddonManager.jsm"
|
||||
);
|
||||
|
||||
const { AddonStudies } = ChromeUtils.import(
|
||||
"resource://normandy/lib/AddonStudies.jsm"
|
||||
const { AddonStudies } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/AddonStudies.sys.mjs"
|
||||
);
|
||||
const { NormandyTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/NormandyTestUtils.jsm"
|
||||
const { NormandyTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/NormandyTestUtils.sys.mjs"
|
||||
);
|
||||
const { TestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/TestUtils.sys.mjs"
|
||||
|
|
|
@ -24,6 +24,7 @@ const lazy = {};
|
|||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
AttributionCode: "resource:///modules/AttributionCode.sys.mjs",
|
||||
BuiltInThemes: "resource:///modules/BuiltInThemes.sys.mjs",
|
||||
ClientEnvironment: "resource://normandy/lib/ClientEnvironment.sys.mjs",
|
||||
NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||
ProfileAge: "resource://gre/modules/ProfileAge.sys.mjs",
|
||||
Region: "resource://gre/modules/Region.sys.mjs",
|
||||
|
@ -35,7 +36,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
ASRouterPreferences: "resource://activity-stream/lib/ASRouterPreferences.jsm",
|
||||
AddonManager: "resource://gre/modules/AddonManager.jsm",
|
||||
ClientEnvironment: "resource://normandy/lib/ClientEnvironment.jsm",
|
||||
HomePage: "resource:///modules/HomePage.jsm",
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.jsm",
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
|
|
|
@ -7,6 +7,7 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
|||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
ClientEnvironment: "resource://normandy/lib/ClientEnvironment.sys.mjs",
|
||||
DevToolsShim: "chrome://devtools-startup/content/DevToolsShim.sys.mjs",
|
||||
ResetProfile: "resource://gre/modules/ResetProfile.sys.mjs",
|
||||
UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs",
|
||||
|
@ -18,7 +19,6 @@ import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
|
|||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
ClientEnvironment: "resource://normandy/lib/ClientEnvironment.jsm",
|
||||
});
|
||||
|
||||
if (AppConstants.MOZ_UPDATER) {
|
||||
|
|
|
@ -8,6 +8,7 @@ import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
|
|||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
ClientEnvironment: "resource://normandy/lib/ClientEnvironment.sys.mjs",
|
||||
ClientEnvironmentBase:
|
||||
"resource://gre/modules/components-utils/ClientEnvironment.sys.mjs",
|
||||
FilterExpressions:
|
||||
|
@ -19,7 +20,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
ASRouterTargeting: "resource://activity-stream/lib/ASRouterTargeting.jsm",
|
||||
ClientEnvironment: "resource://normandy/lib/ClientEnvironment.jsm",
|
||||
});
|
||||
|
||||
const TARGETING_EVENT_CATEGORY = "messaging_experiments";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const { ClientEnvironment } = ChromeUtils.import(
|
||||
"resource://normandy/lib/ClientEnvironment.jsm"
|
||||
const { ClientEnvironment } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/ClientEnvironment.sys.mjs"
|
||||
);
|
||||
const { TargetingContext } = ChromeUtils.importESModule(
|
||||
"resource://messaging-system/targeting/Targeting.sys.mjs"
|
||||
|
|
|
@ -7,18 +7,15 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
|||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
ClientEnvironment: "resource://normandy/lib/ClientEnvironment.sys.mjs",
|
||||
ExperimentStore: "resource://nimbus/lib/ExperimentStore.sys.mjs",
|
||||
FirstStartup: "resource://gre/modules/FirstStartup.sys.mjs",
|
||||
NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||
NormandyUtils: "resource://normandy/lib/NormandyUtils.sys.mjs",
|
||||
PrefUtils: "resource://normandy/lib/PrefUtils.sys.mjs",
|
||||
Sampling: "resource://gre/modules/components-utils/Sampling.sys.mjs",
|
||||
TelemetryEnvironment: "resource://gre/modules/TelemetryEnvironment.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
ClientEnvironment: "resource://normandy/lib/ClientEnvironment.jsm",
|
||||
NormandyUtils: "resource://normandy/lib/NormandyUtils.jsm",
|
||||
TelemetryEvents: "resource://normandy/lib/TelemetryEvents.jsm",
|
||||
PrefUtils: "resource://normandy/lib/PrefUtils.jsm",
|
||||
TelemetryEvents: "resource://normandy/lib/TelemetryEvents.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "log", () => {
|
||||
|
|
|
@ -7,9 +7,13 @@ import { SharedDataMap } from "resource://nimbus/lib/SharedDataMap.sys.mjs";
|
|||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PrefUtils: "resource://normandy/lib/PrefUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
FeatureManifest: "resource://nimbus/FeatureManifest.js",
|
||||
PrefUtils: "resource://normandy/lib/PrefUtils.jsm",
|
||||
});
|
||||
|
||||
const IS_MAIN_PROCESS =
|
||||
|
|
|
@ -8,6 +8,7 @@ const lazy = {};
|
|||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
_ExperimentFeature: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||
CleanupManager: "resource://normandy/lib/CleanupManager.sys.mjs",
|
||||
ExperimentManager: "resource://nimbus/lib/ExperimentManager.sys.mjs",
|
||||
JsonSchema: "resource://gre/modules/JsonSchema.sys.mjs",
|
||||
NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||
|
@ -17,7 +18,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
ASRouterTargeting: "resource://activity-stream/lib/ASRouterTargeting.jsm",
|
||||
CleanupManager: "resource://normandy/lib/CleanupManager.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "log", () => {
|
||||
|
|
|
@ -12,6 +12,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
ExperimentAPI: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||
JsonSchema: "resource://gre/modules/JsonSchema.sys.mjs",
|
||||
NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||
NormandyUtils: "resource://normandy/lib/NormandyUtils.sys.mjs",
|
||||
_ExperimentManager: "resource://nimbus/lib/ExperimentManager.sys.mjs",
|
||||
_RemoteSettingsExperimentLoader:
|
||||
"resource://nimbus/lib/RemoteSettingsExperimentLoader.sys.mjs",
|
||||
|
@ -19,7 +20,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
NormandyUtils: "resource://normandy/lib/NormandyUtils.jsm",
|
||||
FeatureManifest: "resource://nimbus/FeatureManifest.js",
|
||||
});
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
"use strict";
|
||||
|
||||
const { NormandyTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/NormandyTestUtils.jsm"
|
||||
const { NormandyTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/NormandyTestUtils.sys.mjs"
|
||||
);
|
||||
const { Sampling } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/components-utils/Sampling.sys.mjs"
|
||||
);
|
||||
const { ClientEnvironment } = ChromeUtils.import(
|
||||
"resource://normandy/lib/ClientEnvironment.jsm"
|
||||
const { ClientEnvironment } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/ClientEnvironment.sys.mjs"
|
||||
);
|
||||
const { cleanupStorePrefCache } = ExperimentFakes;
|
||||
|
||||
|
@ -17,8 +17,8 @@ const { ExperimentStore } = ChromeUtils.importESModule(
|
|||
const { TelemetryEnvironment } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/TelemetryEnvironment.sys.mjs"
|
||||
);
|
||||
const { TelemetryEvents } = ChromeUtils.import(
|
||||
"resource://normandy/lib/TelemetryEvents.jsm"
|
||||
const { TelemetryEvents } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/TelemetryEvents.sys.mjs"
|
||||
);
|
||||
|
||||
const { SYNC_DATA_PREF_BRANCH, SYNC_DEFAULTS_PREF_BRANCH } = ExperimentStore;
|
||||
|
|
|
@ -6,15 +6,15 @@ const {
|
|||
NimbusFeatures,
|
||||
} = ChromeUtils.importESModule("resource://nimbus/ExperimentAPI.sys.mjs");
|
||||
|
||||
const { PrefUtils } = ChromeUtils.import(
|
||||
"resource://normandy/lib/PrefUtils.jsm"
|
||||
const { PrefUtils } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/PrefUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const { TelemetryTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/TelemetryTestUtils.sys.mjs"
|
||||
);
|
||||
const { TelemetryEvents } = ChromeUtils.import(
|
||||
"resource://normandy/lib/TelemetryEvents.jsm"
|
||||
const { TelemetryEvents } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/TelemetryEvents.sys.mjs"
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const { TelemetryEvents } = ChromeUtils.import(
|
||||
"resource://normandy/lib/TelemetryEvents.jsm"
|
||||
const { TelemetryEvents } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/TelemetryEvents.sys.mjs"
|
||||
);
|
||||
const { TelemetryEnvironment } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/TelemetryEnvironment.sys.mjs"
|
||||
|
|
|
@ -18,8 +18,8 @@ const { PanelTestProvider } = ChromeUtils.import(
|
|||
const { TelemetryTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/TelemetryTestUtils.sys.mjs"
|
||||
);
|
||||
const { TelemetryEvents } = ChromeUtils.import(
|
||||
"resource://normandy/lib/TelemetryEvents.jsm"
|
||||
const { TelemetryEvents } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/TelemetryEvents.sys.mjs"
|
||||
);
|
||||
|
||||
add_setup(async function setup() {
|
||||
|
|
|
@ -3,34 +3,29 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { Log } from "resource://gre/modules/Log.sys.mjs";
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { PromiseUtils } from "resource://gre/modules/PromiseUtils.sys.mjs";
|
||||
import { setTimeout } from "resource://gre/modules/Timer.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
AddonRollouts: "resource://normandy/lib/AddonRollouts.sys.mjs",
|
||||
AddonStudies: "resource://normandy/lib/AddonStudies.sys.mjs",
|
||||
CleanupManager: "resource://normandy/lib/CleanupManager.sys.mjs",
|
||||
ExperimentManager: "resource://nimbus/lib/ExperimentManager.sys.mjs",
|
||||
|
||||
LogManager: "resource://normandy/lib/LogManager.sys.mjs",
|
||||
NormandyMigrations: "resource://normandy/NormandyMigrations.sys.mjs",
|
||||
PreferenceExperiments:
|
||||
"resource://normandy/lib/PreferenceExperiments.sys.mjs",
|
||||
PreferenceRollouts: "resource://normandy/lib/PreferenceRollouts.sys.mjs",
|
||||
RecipeRunner: "resource://normandy/lib/RecipeRunner.sys.mjs",
|
||||
RemoteSettingsExperimentLoader:
|
||||
"resource://nimbus/lib/RemoteSettingsExperimentLoader.sys.mjs",
|
||||
|
||||
ShieldPreferences: "resource://normandy/lib/ShieldPreferences.sys.mjs",
|
||||
TelemetryEvents: "resource://normandy/lib/TelemetryEvents.sys.mjs",
|
||||
TelemetryUtils: "resource://gre/modules/TelemetryUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
AddonRollouts: "resource://normandy/lib/AddonRollouts.jsm",
|
||||
AddonStudies: "resource://normandy/lib/AddonStudies.jsm",
|
||||
CleanupManager: "resource://normandy/lib/CleanupManager.jsm",
|
||||
LogManager: "resource://normandy/lib/LogManager.jsm",
|
||||
NormandyMigrations: "resource://normandy/NormandyMigrations.jsm",
|
||||
PreferenceExperiments: "resource://normandy/lib/PreferenceExperiments.jsm",
|
||||
PreferenceRollouts: "resource://normandy/lib/PreferenceRollouts.jsm",
|
||||
RecipeRunner: "resource://normandy/lib/RecipeRunner.jsm",
|
||||
ShieldPreferences: "resource://normandy/lib/ShieldPreferences.jsm",
|
||||
TelemetryEvents: "resource://normandy/lib/TelemetryEvents.jsm",
|
||||
});
|
||||
|
||||
const UI_AVAILABLE_NOTIFICATION = "sessionstore-windows-restored";
|
||||
const BOOTSTRAP_LOGGER_NAME = "app.normandy.bootstrap";
|
||||
const SHIELD_INIT_NOTIFICATION = "shield-init-complete";
|
||||
|
|
|
@ -3,16 +3,9 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { Log } from "resource://gre/modules/Log.sys.mjs";
|
||||
|
||||
const { AddonStudies } = ChromeUtils.import(
|
||||
"resource://normandy/lib/AddonStudies.jsm"
|
||||
);
|
||||
const { PreferenceExperiments } = ChromeUtils.import(
|
||||
"resource://normandy/lib/PreferenceExperiments.jsm"
|
||||
);
|
||||
const { RecipeRunner } = ChromeUtils.import(
|
||||
"resource://normandy/lib/RecipeRunner.jsm"
|
||||
);
|
||||
import { AddonStudies } from "resource://normandy/lib/AddonStudies.sys.mjs";
|
||||
import { PreferenceExperiments } from "resource://normandy/lib/PreferenceExperiments.sys.mjs";
|
||||
import { RecipeRunner } from "resource://normandy/lib/RecipeRunner.sys.mjs";
|
||||
|
||||
const BOOTSTRAP_LOGGER_NAME = "app.normandy.bootstrap";
|
||||
|
||||
|
|
|
@ -10,9 +10,7 @@
|
|||
* process, including the parent one.
|
||||
*/
|
||||
|
||||
const { AboutPages } = ChromeUtils.import(
|
||||
"resource://normandy-content/AboutPages.jsm"
|
||||
);
|
||||
import { AboutPages } from "resource://normandy-content/AboutPages.sys.mjs";
|
||||
|
||||
export function AboutStudies() {
|
||||
return AboutPages.aboutStudies;
|
||||
|
|
|
@ -3,22 +3,19 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const { BaseAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseAction.jsm"
|
||||
);
|
||||
import { BaseAction } from "resource://normandy/actions/BaseAction.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
ActionSchemas: "resource://normandy/actions/schemas/index.sys.mjs",
|
||||
AddonRollouts: "resource://normandy/lib/AddonRollouts.sys.mjs",
|
||||
TelemetryEnvironment: "resource://gre/modules/TelemetryEnvironment.sys.mjs",
|
||||
TelemetryEvents: "resource://normandy/lib/TelemetryEvents.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
ActionSchemas: "resource://normandy/actions/schemas/index.js",
|
||||
AddonManager: "resource://gre/modules/AddonManager.jsm",
|
||||
AddonRollouts: "resource://normandy/lib/AddonRollouts.jsm",
|
||||
TelemetryEvents: "resource://normandy/lib/TelemetryEvents.jsm",
|
||||
});
|
||||
|
||||
export class AddonRollbackAction extends BaseAction {
|
||||
|
|
|
@ -2,25 +2,18 @@
|
|||
* 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/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const { BaseAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseAction.jsm"
|
||||
);
|
||||
import { BaseAction } from "resource://normandy/actions/BaseAction.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
ActionSchemas: "resource://normandy/actions/schemas/index.sys.mjs",
|
||||
AddonRollouts: "resource://normandy/lib/AddonRollouts.sys.mjs",
|
||||
NormandyAddonManager: "resource://normandy/lib/NormandyAddonManager.sys.mjs",
|
||||
NormandyApi: "resource://normandy/lib/NormandyApi.sys.mjs",
|
||||
NormandyUtils: "resource://normandy/lib/NormandyUtils.sys.mjs",
|
||||
TelemetryEnvironment: "resource://gre/modules/TelemetryEnvironment.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
ActionSchemas: "resource://normandy/actions/schemas/index.js",
|
||||
AddonRollouts: "resource://normandy/lib/AddonRollouts.jsm",
|
||||
NormandyAddonManager: "resource://normandy/lib/NormandyAddonManager.jsm",
|
||||
NormandyApi: "resource://normandy/lib/NormandyApi.jsm",
|
||||
NormandyUtils: "resource://normandy/lib/NormandyUtils.jsm",
|
||||
TelemetryEvents: "resource://normandy/lib/TelemetryEvents.jsm",
|
||||
TelemetryEvents: "resource://normandy/lib/TelemetryEvents.sys.mjs",
|
||||
});
|
||||
|
||||
class AddonRolloutError extends Error {
|
||||
|
|
|
@ -2,18 +2,14 @@
|
|||
* 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/. */
|
||||
|
||||
const { Uptake } = ChromeUtils.import("resource://normandy/lib/Uptake.jsm");
|
||||
import { Uptake } from "resource://normandy/lib/Uptake.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"LogManager",
|
||||
"resource://normandy/lib/LogManager.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
JsonSchemaValidator:
|
||||
"resource://gre/modules/components-utils/JsonSchemaValidator.sys.mjs",
|
||||
LogManager: "resource://normandy/lib/LogManager.sys.mjs",
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
* 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/. */
|
||||
|
||||
const { BaseAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseAction.jsm"
|
||||
);
|
||||
import { BaseAction } from "resource://normandy/actions/BaseAction.sys.mjs";
|
||||
|
||||
const OPT_OUT_STUDIES_ENABLED_PREF = "app.shield.optoutstudies.enabled";
|
||||
|
||||
|
|
|
@ -10,28 +10,25 @@
|
|||
*/
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const { BaseStudyAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseStudyAction.jsm"
|
||||
);
|
||||
import { BaseStudyAction } from "resource://normandy/actions/BaseStudyAction.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
ActionSchemas: "resource://normandy/actions/schemas/index.sys.mjs",
|
||||
AddonStudies: "resource://normandy/lib/AddonStudies.sys.mjs",
|
||||
BaseAction: "resource://normandy/actions/BaseAction.sys.mjs",
|
||||
ClientEnvironment: "resource://normandy/lib/ClientEnvironment.sys.mjs",
|
||||
NormandyApi: "resource://normandy/lib/NormandyApi.sys.mjs",
|
||||
NormandyUtils: "resource://normandy/lib/NormandyUtils.sys.mjs",
|
||||
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
|
||||
Sampling: "resource://gre/modules/components-utils/Sampling.sys.mjs",
|
||||
TelemetryEnvironment: "resource://gre/modules/TelemetryEnvironment.sys.mjs",
|
||||
TelemetryEvents: "resource://normandy/lib/TelemetryEvents.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
ActionSchemas: "resource://normandy/actions/schemas/index.js",
|
||||
AddonManager: "resource://gre/modules/AddonManager.jsm",
|
||||
AddonStudies: "resource://normandy/lib/AddonStudies.jsm",
|
||||
BaseAction: "resource://normandy/actions/BaseAction.jsm",
|
||||
ClientEnvironment: "resource://normandy/lib/ClientEnvironment.jsm",
|
||||
NormandyApi: "resource://normandy/lib/NormandyApi.jsm",
|
||||
NormandyUtils: "resource://normandy/lib/NormandyUtils.jsm",
|
||||
TelemetryEvents: "resource://normandy/lib/TelemetryEvents.jsm",
|
||||
});
|
||||
|
||||
class AddonStudyEnrollError extends Error {
|
||||
|
|
|
@ -2,15 +2,12 @@
|
|||
* 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/. */
|
||||
|
||||
const { BaseAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseAction.jsm"
|
||||
);
|
||||
import { BaseAction } from "resource://normandy/actions/BaseAction.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"ActionSchemas",
|
||||
"resource://normandy/actions/schemas/index.js"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
ActionSchemas: "resource://normandy/actions/schemas/index.sys.mjs",
|
||||
});
|
||||
|
||||
export class ConsoleLogAction extends BaseAction {
|
||||
get schema() {
|
||||
|
|
|
@ -2,22 +2,15 @@
|
|||
* 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/. */
|
||||
|
||||
const { BaseStudyAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseStudyAction.jsm"
|
||||
);
|
||||
import { BaseStudyAction } from "resource://normandy/actions/BaseStudyAction.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
ActionSchemas: "resource://normandy/actions/schemas/index.sys.mjs",
|
||||
ExperimentManager: "resource://nimbus/lib/ExperimentManager.sys.mjs",
|
||||
});
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"ActionSchemas",
|
||||
"resource://normandy/actions/schemas/index.js"
|
||||
);
|
||||
|
||||
const RECIPE_SOURCE = "normandy";
|
||||
|
||||
export class MessagingExperimentAction extends BaseStudyAction {
|
||||
|
|
|
@ -2,33 +2,17 @@
|
|||
* 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/. */
|
||||
|
||||
const { BaseStudyAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseStudyAction.jsm"
|
||||
);
|
||||
import { BaseStudyAction } from "resource://normandy/actions/BaseStudyAction.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
ActionSchemas: "resource://normandy/actions/schemas/index.sys.mjs",
|
||||
BaseAction: "resource://normandy/actions/BaseAction.sys.mjs",
|
||||
ClientEnvironment: "resource://normandy/lib/ClientEnvironment.sys.mjs",
|
||||
PreferenceExperiments:
|
||||
"resource://normandy/lib/PreferenceExperiments.sys.mjs",
|
||||
Sampling: "resource://gre/modules/components-utils/Sampling.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"ActionSchemas",
|
||||
"resource://normandy/actions/schemas/index.js"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"BaseAction",
|
||||
"resource://normandy/actions/BaseAction.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"ClientEnvironment",
|
||||
"resource://normandy/lib/ClientEnvironment.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PreferenceExperiments",
|
||||
"resource://normandy/lib/PreferenceExperiments.jsm"
|
||||
);
|
||||
|
||||
/**
|
||||
* Enrolls a user in a preference experiment, in which we assign the
|
||||
|
|
|
@ -2,33 +2,16 @@
|
|||
* 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/. */
|
||||
|
||||
const { BaseAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseAction.jsm"
|
||||
);
|
||||
import { BaseAction } from "resource://normandy/actions/BaseAction.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
ActionSchemas: "resource://normandy/actions/schemas/index.sys.mjs",
|
||||
PrefUtils: "resource://normandy/lib/PrefUtils.sys.mjs",
|
||||
PreferenceRollouts: "resource://normandy/lib/PreferenceRollouts.sys.mjs",
|
||||
TelemetryEnvironment: "resource://gre/modules/TelemetryEnvironment.sys.mjs",
|
||||
TelemetryEvents: "resource://normandy/lib/TelemetryEvents.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PreferenceRollouts",
|
||||
"resource://normandy/lib/PreferenceRollouts.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PrefUtils",
|
||||
"resource://normandy/lib/PrefUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"ActionSchemas",
|
||||
"resource://normandy/actions/schemas/index.js"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"TelemetryEvents",
|
||||
"resource://normandy/lib/TelemetryEvents.jsm"
|
||||
);
|
||||
|
||||
export class PreferenceRollbackAction extends BaseAction {
|
||||
get schema() {
|
||||
|
|
|
@ -2,38 +2,17 @@
|
|||
* 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/. */
|
||||
|
||||
const { BaseAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseAction.jsm"
|
||||
);
|
||||
import { BaseAction } from "resource://normandy/actions/BaseAction.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
ActionSchemas: "resource://normandy/actions/schemas/index.sys.mjs",
|
||||
NormandyUtils: "resource://normandy/lib/NormandyUtils.sys.mjs",
|
||||
PrefUtils: "resource://normandy/lib/PrefUtils.sys.mjs",
|
||||
PreferenceRollouts: "resource://normandy/lib/PreferenceRollouts.sys.mjs",
|
||||
TelemetryEnvironment: "resource://gre/modules/TelemetryEnvironment.sys.mjs",
|
||||
TelemetryEvents: "resource://normandy/lib/TelemetryEvents.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PreferenceRollouts",
|
||||
"resource://normandy/lib/PreferenceRollouts.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PrefUtils",
|
||||
"resource://normandy/lib/PrefUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"ActionSchemas",
|
||||
"resource://normandy/actions/schemas/index.js"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"TelemetryEvents",
|
||||
"resource://normandy/lib/TelemetryEvents.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"NormandyUtils",
|
||||
"resource://normandy/lib/NormandyUtils.jsm"
|
||||
);
|
||||
|
||||
const PREFERENCE_TYPE_MAP = {
|
||||
boolean: Services.prefs.PREF_BOOL,
|
||||
|
|
|
@ -3,23 +3,21 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { BaseAction } from "resource://normandy/actions/BaseAction.sys.mjs";
|
||||
|
||||
const { BaseAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseAction.jsm"
|
||||
);
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
ActionSchemas: "resource://normandy/actions/schemas/index.js",
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
ClientEnvironment: "resource://normandy/lib/ClientEnvironment.jsm",
|
||||
Heartbeat: "resource://normandy/lib/Heartbeat.jsm",
|
||||
Storage: "resource://normandy/lib/Storage.jsm",
|
||||
NormandyUtils: "resource://normandy/lib/NormandyUtils.jsm",
|
||||
});
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
ActionSchemas: "resource://normandy/actions/schemas/index.sys.mjs",
|
||||
ClientEnvironment: "resource://normandy/lib/ClientEnvironment.sys.mjs",
|
||||
Heartbeat: "resource://normandy/lib/Heartbeat.sys.mjs",
|
||||
NormandyUtils: "resource://normandy/lib/NormandyUtils.sys.mjs",
|
||||
ShellService: "resource:///modules/ShellService.sys.mjs",
|
||||
Storage: "resource://normandy/lib/Storage.sys.mjs",
|
||||
UpdateUtils: "resource://gre/modules/UpdateUtils.sys.mjs",
|
||||
});
|
||||
|
||||
|
|
|
@ -6,28 +6,14 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
|||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"AddonStudies",
|
||||
"resource://normandy/lib/AddonStudies.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"BranchedAddonStudyAction",
|
||||
"resource://normandy/actions/BranchedAddonStudyAction.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PreferenceExperiments",
|
||||
"resource://normandy/lib/PreferenceExperiments.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"RecipeRunner",
|
||||
"resource://normandy/lib/RecipeRunner.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
AddonStudies: "resource://normandy/lib/AddonStudies.sys.mjs",
|
||||
BranchedAddonStudyAction:
|
||||
"resource://normandy/actions/BranchedAddonStudyAction.sys.mjs",
|
||||
ExperimentManager: "resource://nimbus/lib/ExperimentManager.sys.mjs",
|
||||
PreferenceExperiments:
|
||||
"resource://normandy/lib/PreferenceExperiments.sys.mjs",
|
||||
RecipeRunner: "resource://normandy/lib/RecipeRunner.sys.mjs",
|
||||
RemoteSettingsExperimentLoader:
|
||||
"resource://nimbus/lib/RemoteSettingsExperimentLoader.sys.mjs",
|
||||
});
|
||||
|
|
|
@ -11,15 +11,12 @@
|
|||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const frameGlobal = {};
|
||||
ChromeUtils.defineModuleGetter(
|
||||
frameGlobal,
|
||||
"AboutPages",
|
||||
"resource://normandy-content/AboutPages.jsm"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
AboutPages: "resource://normandy-content/AboutPages.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "gBrandBundle", function() {
|
||||
return Services.strings.createBundle(
|
||||
"chrome://branding/locale/brand.properties"
|
||||
|
@ -111,7 +108,7 @@ export class ShieldFrameChild extends JSWindowActorChild {
|
|||
case "GetRemoteValue:ShieldLearnMoreHref":
|
||||
this.triggerPageCallback(
|
||||
"ReceiveRemoteValue:ShieldLearnMoreHref",
|
||||
frameGlobal.AboutPages.aboutStudies.getShieldLearnMoreHref()
|
||||
lazy.AboutPages.aboutStudies.getShieldLearnMoreHref()
|
||||
);
|
||||
break;
|
||||
case "GetRemoteValue:ShieldTranslations":
|
||||
|
|
|
@ -2,16 +2,15 @@
|
|||
* 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/. */
|
||||
|
||||
const frameGlobal = {};
|
||||
ChromeUtils.defineModuleGetter(
|
||||
frameGlobal,
|
||||
"AboutPages",
|
||||
"resource://normandy-content/AboutPages.jsm"
|
||||
);
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
AboutPages: "resource://normandy-content/AboutPages.sys.mjs",
|
||||
});
|
||||
|
||||
export class ShieldFrameParent extends JSWindowActorParent {
|
||||
async receiveMessage(msg) {
|
||||
let { aboutStudies } = frameGlobal.AboutPages;
|
||||
let { aboutStudies } = lazy.AboutPages;
|
||||
switch (msg.name) {
|
||||
case "Shield:AddToWeakSet":
|
||||
aboutStudies.addToWeakSet(this.browsingContext);
|
||||
|
|
|
@ -2,31 +2,29 @@
|
|||
* 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/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const { LogManager } = ChromeUtils.import(
|
||||
"resource://normandy/lib/LogManager.jsm"
|
||||
);
|
||||
import { LogManager } from "resource://normandy/lib/LogManager.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
AddonRollbackAction: "resource://normandy/actions/AddonRollbackAction.jsm",
|
||||
AddonRolloutAction: "resource://normandy/actions/AddonRolloutAction.jsm",
|
||||
BaseAction: "resource://normandy/actions/BaseAction.jsm",
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
AddonRollbackAction:
|
||||
"resource://normandy/actions/AddonRollbackAction.sys.mjs",
|
||||
AddonRolloutAction: "resource://normandy/actions/AddonRolloutAction.sys.mjs",
|
||||
BaseAction: "resource://normandy/actions/BaseAction.sys.mjs",
|
||||
BranchedAddonStudyAction:
|
||||
"resource://normandy/actions/BranchedAddonStudyAction.jsm",
|
||||
ConsoleLogAction: "resource://normandy/actions/ConsoleLogAction.jsm",
|
||||
"resource://normandy/actions/BranchedAddonStudyAction.sys.mjs",
|
||||
ConsoleLogAction: "resource://normandy/actions/ConsoleLogAction.sys.mjs",
|
||||
MessagingExperimentAction:
|
||||
"resource://normandy/actions/MessagingExperimentAction.jsm",
|
||||
"resource://normandy/actions/MessagingExperimentAction.sys.mjs",
|
||||
PreferenceExperimentAction:
|
||||
"resource://normandy/actions/PreferenceExperimentAction.jsm",
|
||||
"resource://normandy/actions/PreferenceExperimentAction.sys.mjs",
|
||||
PreferenceRollbackAction:
|
||||
"resource://normandy/actions/PreferenceRollbackAction.jsm",
|
||||
"resource://normandy/actions/PreferenceRollbackAction.sys.mjs",
|
||||
PreferenceRolloutAction:
|
||||
"resource://normandy/actions/PreferenceRolloutAction.jsm",
|
||||
ShowHeartbeatAction: "resource://normandy/actions/ShowHeartbeatAction.jsm",
|
||||
Uptake: "resource://normandy/lib/Uptake.jsm",
|
||||
"resource://normandy/actions/PreferenceRolloutAction.sys.mjs",
|
||||
ShowHeartbeatAction:
|
||||
"resource://normandy/actions/ShowHeartbeatAction.sys.mjs",
|
||||
Uptake: "resource://normandy/lib/Uptake.sys.mjs",
|
||||
});
|
||||
|
||||
const log = LogManager.getLogger("recipe-runner");
|
||||
|
|
|
@ -7,12 +7,8 @@ const lazy = {};
|
|||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
IndexedDB: "resource://gre/modules/IndexedDB.sys.mjs",
|
||||
TelemetryEnvironment: "resource://gre/modules/TelemetryEnvironment.sys.mjs",
|
||||
TelemetryEvents: "resource://normandy/lib/TelemetryEvents.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"TelemetryEvents",
|
||||
"resource://normandy/lib/TelemetryEvents.jsm"
|
||||
);
|
||||
|
||||
/**
|
||||
* AddonRollouts store info about an active or expired addon rollouts.
|
||||
|
|
|
@ -43,36 +43,24 @@
|
|||
* or any other purpose. May be null on old study.
|
||||
*/
|
||||
|
||||
const { LogManager } = ChromeUtils.import(
|
||||
"resource://normandy/lib/LogManager.jsm"
|
||||
);
|
||||
import { LogManager } from "resource://normandy/lib/LogManager.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BranchedAddonStudyAction:
|
||||
"resource://normandy/actions/BranchedAddonStudyAction.sys.mjs",
|
||||
CleanupManager: "resource://normandy/lib/CleanupManager.sys.mjs",
|
||||
IndexedDB: "resource://gre/modules/IndexedDB.sys.mjs",
|
||||
TelemetryEnvironment: "resource://gre/modules/TelemetryEnvironment.sys.mjs",
|
||||
TelemetryEvents: "resource://normandy/lib/TelemetryEvents.sys.mjs",
|
||||
});
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"AddonManager",
|
||||
"resource://gre/modules/AddonManager.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"BranchedAddonStudyAction",
|
||||
"resource://normandy/actions/BranchedAddonStudyAction.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"CleanupManager",
|
||||
"resource://normandy/lib/CleanupManager.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"TelemetryEvents",
|
||||
"resource://normandy/lib/TelemetryEvents.jsm"
|
||||
);
|
||||
|
||||
const DB_NAME = "shield";
|
||||
const STORE_NAME = "addon-studies";
|
||||
|
|
|
@ -6,31 +6,14 @@ import { ClientEnvironmentBase } from "resource://gre/modules/components-utils/C
|
|||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"NormandyApi",
|
||||
"resource://normandy/lib/NormandyApi.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PreferenceExperiments",
|
||||
"resource://normandy/lib/PreferenceExperiments.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PreferenceRollouts",
|
||||
"resource://normandy/lib/PreferenceRollouts.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"AddonStudies",
|
||||
"resource://normandy/lib/AddonStudies.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"AddonRollouts",
|
||||
"resource://normandy/lib/AddonRollouts.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
AddonRollouts: "resource://normandy/lib/AddonRollouts.sys.mjs",
|
||||
AddonStudies: "resource://normandy/lib/AddonStudies.sys.mjs",
|
||||
NormandyApi: "resource://normandy/lib/NormandyApi.sys.mjs",
|
||||
PreferenceExperiments:
|
||||
"resource://normandy/lib/PreferenceExperiments.sys.mjs",
|
||||
PreferenceRollouts: "resource://normandy/lib/PreferenceRollouts.sys.mjs",
|
||||
});
|
||||
|
||||
// Cached API request for client attributes that are determined by the Normandy
|
||||
// service.
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
* 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/. */
|
||||
|
||||
const { LogManager } = ChromeUtils.import(
|
||||
"resource://normandy/lib/LogManager.jsm"
|
||||
);
|
||||
import { LogManager } from "resource://normandy/lib/LogManager.sys.mjs";
|
||||
|
||||
const log = LogManager.getLogger("event-emitter");
|
||||
|
||||
|
|
|
@ -5,16 +5,9 @@
|
|||
import { Preferences } from "resource://gre/modules/Preferences.sys.mjs";
|
||||
import { TelemetryController } from "resource://gre/modules/TelemetryController.sys.mjs";
|
||||
import { clearTimeout, setTimeout } from "resource://gre/modules/Timer.sys.mjs";
|
||||
|
||||
const { CleanupManager } = ChromeUtils.import(
|
||||
"resource://normandy/lib/CleanupManager.jsm"
|
||||
);
|
||||
const { EventEmitter } = ChromeUtils.import(
|
||||
"resource://normandy/lib/EventEmitter.jsm"
|
||||
);
|
||||
const { LogManager } = ChromeUtils.import(
|
||||
"resource://normandy/lib/LogManager.jsm"
|
||||
);
|
||||
import { CleanupManager } from "resource://normandy/lib/CleanupManager.sys.mjs";
|
||||
import { EventEmitter } from "resource://normandy/lib/EventEmitter.sys.mjs";
|
||||
import { LogManager } from "resource://normandy/lib/LogManager.sys.mjs";
|
||||
|
||||
const PREF_SURVEY_DURATION = "browser.uitour.surveyDuration";
|
||||
const NOTIFICATION_TIME = 3000;
|
||||
|
|
|
@ -5,11 +5,9 @@
|
|||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"LogManager",
|
||||
"resource://normandy/lib/LogManager.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
LogManager: "resource://normandy/lib/LogManager.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "log", () => {
|
||||
return lazy.LogManager.getLogger("preference-experiments");
|
||||
|
|
|
@ -77,34 +77,17 @@
|
|||
*/
|
||||
|
||||
import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
|
||||
|
||||
const { CleanupManager } = ChromeUtils.import(
|
||||
"resource://normandy/lib/CleanupManager.jsm"
|
||||
);
|
||||
const { LogManager } = ChromeUtils.import(
|
||||
"resource://normandy/lib/LogManager.jsm"
|
||||
);
|
||||
import { CleanupManager } from "resource://normandy/lib/CleanupManager.sys.mjs";
|
||||
import { LogManager } from "resource://normandy/lib/LogManager.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
JSONFile: "resource://gre/modules/JSONFile.sys.mjs",
|
||||
NormandyUtils: "resource://normandy/lib/NormandyUtils.sys.mjs",
|
||||
PrefUtils: "resource://normandy/lib/PrefUtils.sys.mjs",
|
||||
TelemetryEnvironment: "resource://gre/modules/TelemetryEnvironment.sys.mjs",
|
||||
TelemetryEvents: "resource://normandy/lib/TelemetryEvents.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"TelemetryEvents",
|
||||
"resource://normandy/lib/TelemetryEvents.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"NormandyUtils",
|
||||
"resource://normandy/lib/NormandyUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PrefUtils",
|
||||
"resource://normandy/lib/PrefUtils.jsm"
|
||||
);
|
||||
|
||||
const EXPERIMENT_FILE = "shield-preference-experiments.json";
|
||||
const STARTUP_EXPERIMENT_PREFS_BRANCH = "app.normandy.startupExperimentPrefs.";
|
||||
|
|
|
@ -2,29 +2,16 @@
|
|||
* 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/. */
|
||||
|
||||
const { LogManager } = ChromeUtils.import(
|
||||
"resource://normandy/lib/LogManager.jsm"
|
||||
);
|
||||
import { LogManager } from "resource://normandy/lib/LogManager.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
CleanupManager: "resource://normandy/lib/CleanupManager.sys.mjs",
|
||||
IndexedDB: "resource://gre/modules/IndexedDB.sys.mjs",
|
||||
PrefUtils: "resource://normandy/lib/PrefUtils.sys.mjs",
|
||||
TelemetryEnvironment: "resource://gre/modules/TelemetryEnvironment.sys.mjs",
|
||||
TelemetryEvents: "resource://normandy/lib/TelemetryEvents.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"CleanupManager",
|
||||
"resource://normandy/lib/CleanupManager.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PrefUtils",
|
||||
"resource://normandy/lib/PrefUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"TelemetryEvents",
|
||||
"resource://normandy/lib/TelemetryEvents.jsm"
|
||||
);
|
||||
|
||||
const log = LogManager.getLogger("recipe-runner");
|
||||
|
||||
|
|
|
@ -3,10 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const { LogManager } = ChromeUtils.import(
|
||||
"resource://normandy/lib/LogManager.jsm"
|
||||
);
|
||||
import { LogManager } from "resource://normandy/lib/LogManager.sys.mjs";
|
||||
import { PromiseUtils } from "resource://gre/modules/PromiseUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
@ -19,28 +16,25 @@ XPCOMUtils.defineLazyServiceGetter(
|
|||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
ActionsManager: "resource://normandy/lib/ActionsManager.sys.mjs",
|
||||
BaseAction: "resource://normandy/actions/BaseAction.sys.mjs",
|
||||
CleanupManager: "resource://normandy/lib/CleanupManager.sys.mjs",
|
||||
ClientEnvironment: "resource://normandy/lib/ClientEnvironment.sys.mjs",
|
||||
FilterExpressions:
|
||||
"resource://gre/modules/components-utils/FilterExpressions.sys.mjs",
|
||||
LegacyHeartbeat: "resource://normandy/lib/LegacyHeartbeat.sys.mjs",
|
||||
Normandy: "resource://normandy/Normandy.sys.mjs",
|
||||
NormandyApi: "resource://normandy/lib/NormandyApi.sys.mjs",
|
||||
RemoteSettings: "resource://services-settings/remote-settings.sys.mjs",
|
||||
RemoteSettingsClient:
|
||||
"resource://services-settings/RemoteSettingsClient.sys.mjs",
|
||||
Storage: "resource://normandy/lib/Storage.sys.mjs",
|
||||
TargetingContext: "resource://messaging-system/targeting/Targeting.sys.mjs",
|
||||
Uptake: "resource://normandy/lib/Uptake.sys.mjs",
|
||||
clearTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
Storage: "resource://normandy/lib/Storage.jsm",
|
||||
Normandy: "resource://normandy/Normandy.jsm",
|
||||
NormandyApi: "resource://normandy/lib/NormandyApi.jsm",
|
||||
ClientEnvironment: "resource://normandy/lib/ClientEnvironment.jsm",
|
||||
CleanupManager: "resource://normandy/lib/CleanupManager.jsm",
|
||||
Uptake: "resource://normandy/lib/Uptake.jsm",
|
||||
ActionsManager: "resource://normandy/lib/ActionsManager.jsm",
|
||||
BaseAction: "resource://normandy/actions/BaseAction.jsm",
|
||||
});
|
||||
|
||||
const log = LogManager.getLogger("recipe-runner");
|
||||
const TIMER_NAME = "recipe-client-addon-run";
|
||||
const REMOTE_SETTINGS_COLLECTION = "normandy-recipes-capabilities";
|
||||
|
|
|
@ -2,16 +2,15 @@
|
|||
* 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/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BranchedAddonStudyAction:
|
||||
"resource://normandy/actions/BranchedAddonStudyAction.jsm",
|
||||
AddonStudies: "resource://normandy/lib/AddonStudies.jsm",
|
||||
CleanupManager: "resource://normandy/lib/CleanupManager.jsm",
|
||||
PreferenceExperiments: "resource://normandy/lib/PreferenceExperiments.jsm",
|
||||
"resource://normandy/actions/BranchedAddonStudyAction.sys.mjs",
|
||||
AddonStudies: "resource://normandy/lib/AddonStudies.sys.mjs",
|
||||
CleanupManager: "resource://normandy/lib/CleanupManager.sys.mjs",
|
||||
PreferenceExperiments:
|
||||
"resource://normandy/lib/PreferenceExperiments.sys.mjs",
|
||||
});
|
||||
|
||||
const NS_PREFBRANCH_PREFCHANGE_TOPIC_ID = "nsPref:changed"; // from modules/libpref/nsIPrefBranch.idl
|
||||
|
|
|
@ -3,16 +3,9 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { Preferences } from "resource://gre/modules/Preferences.sys.mjs";
|
||||
|
||||
const { AddonStudies } = ChromeUtils.import(
|
||||
"resource://normandy/lib/AddonStudies.jsm"
|
||||
);
|
||||
const { NormandyUtils } = ChromeUtils.import(
|
||||
"resource://normandy/lib/NormandyUtils.jsm"
|
||||
);
|
||||
const { RecipeRunner } = ChromeUtils.import(
|
||||
"resource://normandy/lib/RecipeRunner.jsm"
|
||||
);
|
||||
import { AddonStudies } from "resource://normandy/lib/AddonStudies.sys.mjs";
|
||||
import { NormandyUtils } from "resource://normandy/lib/NormandyUtils.sys.mjs";
|
||||
import { RecipeRunner } from "resource://normandy/lib/RecipeRunner.sys.mjs";
|
||||
import { sinon } from "resource://testing-common/Sinon.sys.mjs";
|
||||
|
||||
const FIXTURE_ADDON_ID = "normandydriver-a@example.com";
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
"use strict";
|
||||
|
||||
const { BaseAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseAction.jsm"
|
||||
const { BaseAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/BaseAction.sys.mjs"
|
||||
);
|
||||
const { ActionsManager } = ChromeUtils.import(
|
||||
"resource://normandy/lib/ActionsManager.jsm"
|
||||
const { ActionsManager } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/ActionsManager.sys.mjs"
|
||||
);
|
||||
const { Uptake } = ChromeUtils.import("resource://normandy/lib/Uptake.jsm");
|
||||
const { ActionSchemas } = ChromeUtils.import(
|
||||
"resource://normandy/actions/schemas/index.js"
|
||||
const { Uptake } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/Uptake.sys.mjs"
|
||||
);
|
||||
const { ActionSchemas } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/schemas/index.sys.mjs"
|
||||
);
|
||||
|
||||
// Test life cycle methods for actions
|
||||
|
|
|
@ -4,8 +4,8 @@ const { IndexedDB } = ChromeUtils.importESModule(
|
|||
"resource://gre/modules/IndexedDB.sys.mjs"
|
||||
);
|
||||
|
||||
const { AddonRollouts } = ChromeUtils.import(
|
||||
"resource://normandy/lib/AddonRollouts.jsm"
|
||||
const { AddonRollouts } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/AddonRollouts.sys.mjs"
|
||||
);
|
||||
|
||||
decorate_task(AddonRollouts.withTestMock(), async function testGetMissing() {
|
||||
|
|
|
@ -4,8 +4,8 @@ const { IndexedDB } = ChromeUtils.importESModule(
|
|||
"resource://gre/modules/IndexedDB.sys.mjs"
|
||||
);
|
||||
|
||||
const { NormandyTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/NormandyTestUtils.jsm"
|
||||
const { NormandyTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/NormandyTestUtils.sys.mjs"
|
||||
);
|
||||
const {
|
||||
addonStudyFactory,
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
"use strict";
|
||||
|
||||
const { BaseAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseAction.jsm"
|
||||
const { BaseAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/BaseAction.sys.mjs"
|
||||
);
|
||||
const { Uptake } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/Uptake.sys.mjs"
|
||||
);
|
||||
const { Uptake } = ChromeUtils.import("resource://normandy/lib/Uptake.jsm");
|
||||
|
||||
class NoopAction extends BaseAction {
|
||||
constructor() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const { CleanupManager } = ChromeUtils.import(
|
||||
"resource://normandy/lib/CleanupManager.jsm"
|
||||
const { CleanupManager } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/CleanupManager.sys.mjs"
|
||||
); /* global CleanupManagerClass */
|
||||
|
||||
add_task(async function testCleanupManager() {
|
||||
|
|
|
@ -4,23 +4,23 @@ const { TelemetryController } = ChromeUtils.importESModule(
|
|||
"resource://gre/modules/TelemetryController.sys.mjs"
|
||||
);
|
||||
|
||||
const { AddonRollouts } = ChromeUtils.import(
|
||||
"resource://normandy/lib/AddonRollouts.jsm"
|
||||
const { AddonRollouts } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/AddonRollouts.sys.mjs"
|
||||
);
|
||||
const { ClientEnvironment } = ChromeUtils.import(
|
||||
"resource://normandy/lib/ClientEnvironment.jsm"
|
||||
const { ClientEnvironment } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/ClientEnvironment.sys.mjs"
|
||||
);
|
||||
const { PreferenceExperiments } = ChromeUtils.import(
|
||||
"resource://normandy/lib/PreferenceExperiments.jsm"
|
||||
const { PreferenceExperiments } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/PreferenceExperiments.sys.mjs"
|
||||
);
|
||||
const { PreferenceRollouts } = ChromeUtils.import(
|
||||
"resource://normandy/lib/PreferenceRollouts.jsm"
|
||||
const { PreferenceRollouts } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/PreferenceRollouts.sys.mjs"
|
||||
);
|
||||
const { RecipeRunner } = ChromeUtils.import(
|
||||
"resource://normandy/lib/RecipeRunner.jsm"
|
||||
const { RecipeRunner } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/RecipeRunner.sys.mjs"
|
||||
);
|
||||
const { NormandyTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/NormandyTestUtils.jsm"
|
||||
const { NormandyTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/NormandyTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
add_task(async function testTelemetry() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const { EventEmitter } = ChromeUtils.import(
|
||||
"resource://normandy/lib/EventEmitter.jsm"
|
||||
const { EventEmitter } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/EventEmitter.sys.mjs"
|
||||
);
|
||||
|
||||
const evidence = {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const { Heartbeat } = ChromeUtils.import(
|
||||
"resource://normandy/lib/Heartbeat.jsm"
|
||||
const { Heartbeat } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/Heartbeat.sys.mjs"
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,24 +3,26 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { BaseAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseAction.jsm"
|
||||
const { BaseAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/BaseAction.sys.mjs"
|
||||
);
|
||||
const { ClientEnvironment } = ChromeUtils.import(
|
||||
"resource://normandy/lib/ClientEnvironment.jsm"
|
||||
const { ClientEnvironment } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/ClientEnvironment.sys.mjs"
|
||||
);
|
||||
const { Heartbeat } = ChromeUtils.import(
|
||||
"resource://normandy/lib/Heartbeat.jsm"
|
||||
const { Heartbeat } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/Heartbeat.sys.mjs"
|
||||
);
|
||||
const { Normandy } = ChromeUtils.importESModule(
|
||||
"resource://normandy/Normandy.sys.mjs"
|
||||
);
|
||||
const { Normandy } = ChromeUtils.import("resource://normandy/Normandy.jsm");
|
||||
const { ExperimentAPI } = ChromeUtils.importESModule(
|
||||
"resource://nimbus/ExperimentAPI.sys.mjs"
|
||||
);
|
||||
const { ExperimentFakes } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/NimbusTestUtils.sys.mjs"
|
||||
);
|
||||
const { RecipeRunner } = ChromeUtils.import(
|
||||
"resource://normandy/lib/RecipeRunner.jsm"
|
||||
const { RecipeRunner } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/RecipeRunner.sys.mjs"
|
||||
);
|
||||
const { RemoteSettings } = ChromeUtils.import(
|
||||
"resource://services-settings/remote-settings.js"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const { LogManager } = ChromeUtils.import(
|
||||
"resource://normandy/lib/LogManager.jsm"
|
||||
const { LogManager } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/LogManager.sys.mjs"
|
||||
);
|
||||
|
||||
add_task(async function() {
|
||||
|
|
|
@ -3,22 +3,26 @@
|
|||
const { TelemetryUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/TelemetryUtils.sys.mjs"
|
||||
);
|
||||
const { Normandy } = ChromeUtils.import("resource://normandy/Normandy.jsm");
|
||||
const { AddonRollouts } = ChromeUtils.import(
|
||||
"resource://normandy/lib/AddonRollouts.jsm"
|
||||
const { Normandy } = ChromeUtils.importESModule(
|
||||
"resource://normandy/Normandy.sys.mjs"
|
||||
);
|
||||
const { PreferenceExperiments } = ChromeUtils.import(
|
||||
"resource://normandy/lib/PreferenceExperiments.jsm"
|
||||
const { AddonRollouts } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/AddonRollouts.sys.mjs"
|
||||
);
|
||||
const { PreferenceRollouts } = ChromeUtils.import(
|
||||
"resource://normandy/lib/PreferenceRollouts.jsm"
|
||||
const { PreferenceExperiments } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/PreferenceExperiments.sys.mjs"
|
||||
);
|
||||
const { RecipeRunner } = ChromeUtils.import(
|
||||
"resource://normandy/lib/RecipeRunner.jsm"
|
||||
const { PreferenceRollouts } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/PreferenceRollouts.sys.mjs"
|
||||
);
|
||||
const { RecipeRunner } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/RecipeRunner.sys.mjs"
|
||||
);
|
||||
const {
|
||||
NormandyTestUtils: { factories },
|
||||
} = ChromeUtils.import("resource://testing-common/NormandyTestUtils.jsm");
|
||||
} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/NormandyTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const experimentPref1 = "test.initExperimentPrefs1";
|
||||
const experimentPref2 = "test.initExperimentPrefs2";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const { NormandyAddonManager } = ChromeUtils.import(
|
||||
"resource://normandy/lib/NormandyAddonManager.jsm"
|
||||
const { NormandyAddonManager } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/NormandyAddonManager.sys.mjs"
|
||||
);
|
||||
|
||||
decorate_task(ensureAddonCleanup(), async function download_and_install() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const { NormandyMigrations } = ChromeUtils.import(
|
||||
"resource://normandy/NormandyMigrations.jsm"
|
||||
const { NormandyMigrations } = ChromeUtils.importESModule(
|
||||
"resource://normandy/NormandyMigrations.sys.mjs"
|
||||
);
|
||||
|
||||
decorate_task(withMockPreferences(), async function testApplyMigrations({
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
"use strict";
|
||||
|
||||
const { PreferenceExperiments } = ChromeUtils.import(
|
||||
"resource://normandy/lib/PreferenceExperiments.jsm"
|
||||
const { PreferenceExperiments } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/PreferenceExperiments.sys.mjs"
|
||||
);
|
||||
const { CleanupManager } = ChromeUtils.import(
|
||||
"resource://normandy/lib/CleanupManager.jsm"
|
||||
const { CleanupManager } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/CleanupManager.sys.mjs"
|
||||
);
|
||||
const { NormandyUtils } = ChromeUtils.import(
|
||||
"resource://normandy/lib/NormandyUtils.jsm"
|
||||
const { NormandyUtils } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/NormandyUtils.sys.mjs"
|
||||
);
|
||||
const { NormandyTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/NormandyTestUtils.jsm"
|
||||
const { NormandyTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/NormandyTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
// Save ourselves some typing
|
||||
|
|
|
@ -4,14 +4,16 @@ const { IndexedDB } = ChromeUtils.importESModule(
|
|||
"resource://gre/modules/IndexedDB.sys.mjs"
|
||||
);
|
||||
|
||||
const { PreferenceRollouts } = ChromeUtils.import(
|
||||
"resource://normandy/lib/PreferenceRollouts.jsm"
|
||||
const { PreferenceRollouts } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/PreferenceRollouts.sys.mjs"
|
||||
);
|
||||
const {
|
||||
NormandyTestUtils: {
|
||||
factories: { preferenceRolloutFactory },
|
||||
},
|
||||
} = ChromeUtils.import("resource://testing-common/NormandyTestUtils.jsm");
|
||||
} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/NormandyTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
decorate_task(
|
||||
PreferenceRollouts.withTestMock(),
|
||||
|
|
|
@ -1,29 +1,33 @@
|
|||
"use strict";
|
||||
|
||||
const { NormandyTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/NormandyTestUtils.jsm"
|
||||
const { NormandyTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/NormandyTestUtils.sys.mjs"
|
||||
);
|
||||
const { FilterExpressions } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/components-utils/FilterExpressions.sys.mjs"
|
||||
);
|
||||
|
||||
const { Normandy } = ChromeUtils.import("resource://normandy/Normandy.jsm");
|
||||
const { BaseAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseAction.jsm"
|
||||
const { Normandy } = ChromeUtils.importESModule(
|
||||
"resource://normandy/Normandy.sys.mjs"
|
||||
);
|
||||
const { RecipeRunner } = ChromeUtils.import(
|
||||
"resource://normandy/lib/RecipeRunner.jsm"
|
||||
const { BaseAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/BaseAction.sys.mjs"
|
||||
);
|
||||
const { ClientEnvironment } = ChromeUtils.import(
|
||||
"resource://normandy/lib/ClientEnvironment.jsm"
|
||||
const { RecipeRunner } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/RecipeRunner.sys.mjs"
|
||||
);
|
||||
const { CleanupManager } = ChromeUtils.import(
|
||||
"resource://normandy/lib/CleanupManager.jsm"
|
||||
const { ClientEnvironment } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/ClientEnvironment.sys.mjs"
|
||||
);
|
||||
const { ActionsManager } = ChromeUtils.import(
|
||||
"resource://normandy/lib/ActionsManager.jsm"
|
||||
const { CleanupManager } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/CleanupManager.sys.mjs"
|
||||
);
|
||||
const { ActionsManager } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/ActionsManager.sys.mjs"
|
||||
);
|
||||
const { Uptake } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/Uptake.sys.mjs"
|
||||
);
|
||||
const { Uptake } = ChromeUtils.import("resource://normandy/lib/Uptake.jsm");
|
||||
|
||||
const { RemoteSettings } = ChromeUtils.importESModule(
|
||||
"resource://services-settings/remote-settings.sys.mjs"
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
"use strict";
|
||||
|
||||
const { PreferenceExperiments } = ChromeUtils.import(
|
||||
"resource://normandy/lib/PreferenceExperiments.jsm"
|
||||
const { PreferenceExperiments } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/PreferenceExperiments.sys.mjs"
|
||||
);
|
||||
const { ShieldPreferences } = ChromeUtils.import(
|
||||
"resource://normandy/lib/ShieldPreferences.jsm"
|
||||
const { ShieldPreferences } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/ShieldPreferences.sys.mjs"
|
||||
);
|
||||
|
||||
const OPT_OUT_STUDIES_ENABLED_PREF = "app.shield.optoutstudies.enabled";
|
||||
|
||||
const { NormandyTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/NormandyTestUtils.jsm"
|
||||
const { NormandyTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/NormandyTestUtils.sys.mjs"
|
||||
);
|
||||
const {
|
||||
addonStudyFactory,
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
"use strict";
|
||||
|
||||
const { Uptake } = ChromeUtils.import("resource://normandy/lib/Uptake.jsm");
|
||||
const { Uptake } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/Uptake.sys.mjs"
|
||||
);
|
||||
|
||||
const Telemetry = Services.telemetry;
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
"use strict";
|
||||
|
||||
const { PreferenceExperiments } = ChromeUtils.import(
|
||||
"resource://normandy/lib/PreferenceExperiments.jsm"
|
||||
const { PreferenceExperiments } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/PreferenceExperiments.sys.mjs"
|
||||
);
|
||||
const { RecipeRunner } = ChromeUtils.import(
|
||||
"resource://normandy/lib/RecipeRunner.jsm"
|
||||
const { RecipeRunner } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/RecipeRunner.sys.mjs"
|
||||
);
|
||||
const { ExperimentFakes } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/NimbusTestUtils.sys.mjs"
|
||||
|
@ -16,8 +16,8 @@ const { RemoteSettingsExperimentLoader } = ChromeUtils.importESModule(
|
|||
"resource://nimbus/lib/RemoteSettingsExperimentLoader.sys.mjs"
|
||||
);
|
||||
|
||||
const { NormandyTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/NormandyTestUtils.jsm"
|
||||
const { NormandyTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/NormandyTestUtils.sys.mjs"
|
||||
);
|
||||
const {
|
||||
addonStudyFactory,
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
"use strict";
|
||||
|
||||
const { AddonRollbackAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/AddonRollbackAction.jsm"
|
||||
const { AddonRollbackAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/AddonRollbackAction.sys.mjs"
|
||||
);
|
||||
const { AddonRolloutAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/AddonRolloutAction.jsm"
|
||||
const { AddonRolloutAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/AddonRolloutAction.sys.mjs"
|
||||
);
|
||||
const { BaseAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseAction.jsm"
|
||||
const { BaseAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/BaseAction.sys.mjs"
|
||||
);
|
||||
const { AddonRollouts } = ChromeUtils.import(
|
||||
"resource://normandy/lib/AddonRollouts.jsm"
|
||||
const { AddonRollouts } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/AddonRollouts.sys.mjs"
|
||||
);
|
||||
const { NormandyTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/NormandyTestUtils.jsm"
|
||||
const { NormandyTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/NormandyTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
// Test that a simple recipe unenrolls as expected
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
"use strict";
|
||||
|
||||
const { AddonRolloutAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/AddonRolloutAction.jsm"
|
||||
const { AddonRolloutAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/AddonRolloutAction.sys.mjs"
|
||||
);
|
||||
const { BaseAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseAction.jsm"
|
||||
const { BaseAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/BaseAction.sys.mjs"
|
||||
);
|
||||
const { AddonRollouts } = ChromeUtils.import(
|
||||
"resource://normandy/lib/AddonRollouts.jsm"
|
||||
const { AddonRollouts } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/AddonRollouts.sys.mjs"
|
||||
);
|
||||
const { NormandyTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/NormandyTestUtils.jsm"
|
||||
const { NormandyTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/NormandyTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
// Test that a simple recipe enrolls as expected
|
||||
|
|
|
@ -1,15 +1,17 @@
|
|||
"use strict";
|
||||
|
||||
const { BaseAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseAction.jsm"
|
||||
const { BaseAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/BaseAction.sys.mjs"
|
||||
);
|
||||
const { BranchedAddonStudyAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BranchedAddonStudyAction.jsm"
|
||||
const { BranchedAddonStudyAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/BranchedAddonStudyAction.sys.mjs"
|
||||
);
|
||||
const { Uptake } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/Uptake.sys.mjs"
|
||||
);
|
||||
const { Uptake } = ChromeUtils.import("resource://normandy/lib/Uptake.jsm");
|
||||
|
||||
const { NormandyTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/NormandyTestUtils.jsm"
|
||||
const { NormandyTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/NormandyTestUtils.sys.mjs"
|
||||
);
|
||||
const { branchedAddonStudyFactory } = NormandyTestUtils.factories;
|
||||
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
"use strict";
|
||||
|
||||
const { BaseAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseAction.jsm"
|
||||
const { BaseAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/BaseAction.sys.mjs"
|
||||
);
|
||||
const { ConsoleLogAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/ConsoleLogAction.jsm"
|
||||
const { ConsoleLogAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/ConsoleLogAction.sys.mjs"
|
||||
);
|
||||
const { Uptake } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/Uptake.sys.mjs"
|
||||
);
|
||||
const { Uptake } = ChromeUtils.import("resource://normandy/lib/Uptake.jsm");
|
||||
|
||||
// Test that logging works
|
||||
add_task(async function logging_works() {
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
"use strict";
|
||||
|
||||
const { BaseAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseAction.jsm"
|
||||
const { BaseAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/BaseAction.sys.mjs"
|
||||
);
|
||||
const { Uptake } = ChromeUtils.import("resource://normandy/lib/Uptake.jsm");
|
||||
const { MessagingExperimentAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/MessagingExperimentAction.jsm"
|
||||
const { Uptake } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/Uptake.sys.mjs"
|
||||
);
|
||||
const { MessagingExperimentAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/MessagingExperimentAction.sys.mjs"
|
||||
);
|
||||
|
||||
const { _ExperimentManager, ExperimentManager } = ChromeUtils.importESModule(
|
||||
|
|
|
@ -6,21 +6,23 @@ const { Sampling } = ChromeUtils.importESModule(
|
|||
"resource://gre/modules/components-utils/Sampling.sys.mjs"
|
||||
);
|
||||
|
||||
const { ClientEnvironment } = ChromeUtils.import(
|
||||
"resource://normandy/lib/ClientEnvironment.jsm"
|
||||
const { ClientEnvironment } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/ClientEnvironment.sys.mjs"
|
||||
);
|
||||
const { PreferenceExperiments } = ChromeUtils.import(
|
||||
"resource://normandy/lib/PreferenceExperiments.jsm"
|
||||
const { PreferenceExperiments } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/PreferenceExperiments.sys.mjs"
|
||||
);
|
||||
const { Uptake } = ChromeUtils.import("resource://normandy/lib/Uptake.jsm");
|
||||
const { BaseAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseAction.jsm"
|
||||
const { Uptake } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/Uptake.sys.mjs"
|
||||
);
|
||||
const { PreferenceExperimentAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/PreferenceExperimentAction.jsm"
|
||||
const { BaseAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/BaseAction.sys.mjs"
|
||||
);
|
||||
const { NormandyTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/NormandyTestUtils.jsm"
|
||||
const { PreferenceExperimentAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/PreferenceExperimentAction.sys.mjs"
|
||||
);
|
||||
const { NormandyTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/NormandyTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
function branchFactory(opts = {}) {
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
"use strict";
|
||||
|
||||
const { BaseAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseAction.jsm"
|
||||
const { BaseAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/BaseAction.sys.mjs"
|
||||
);
|
||||
const { PreferenceRollbackAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/PreferenceRollbackAction.jsm"
|
||||
const { PreferenceRollbackAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/PreferenceRollbackAction.sys.mjs"
|
||||
);
|
||||
const { Uptake } = ChromeUtils.import("resource://normandy/lib/Uptake.jsm");
|
||||
const { PreferenceRollouts } = ChromeUtils.import(
|
||||
"resource://normandy/lib/PreferenceRollouts.jsm"
|
||||
const { Uptake } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/Uptake.sys.mjs"
|
||||
);
|
||||
const { PreferenceRollouts } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/PreferenceRollouts.sys.mjs"
|
||||
);
|
||||
|
||||
// Test that a simple recipe rollsback as expected
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
"use strict";
|
||||
|
||||
const { BaseAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseAction.jsm"
|
||||
const { BaseAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/BaseAction.sys.mjs"
|
||||
);
|
||||
const { PreferenceRolloutAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/PreferenceRolloutAction.jsm"
|
||||
const { PreferenceRolloutAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/PreferenceRolloutAction.sys.mjs"
|
||||
);
|
||||
const { PreferenceRollouts } = ChromeUtils.import(
|
||||
"resource://normandy/lib/PreferenceRollouts.jsm"
|
||||
const { PreferenceRollouts } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/PreferenceRollouts.sys.mjs"
|
||||
);
|
||||
const { NormandyTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/NormandyTestUtils.jsm"
|
||||
const { NormandyTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/NormandyTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
// Test that a simple recipe enrolls as expected
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
"use strict";
|
||||
|
||||
const { BaseAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseAction.jsm"
|
||||
const { BaseAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/BaseAction.sys.mjs"
|
||||
);
|
||||
const { ClientEnvironment } = ChromeUtils.import(
|
||||
"resource://normandy/lib/ClientEnvironment.jsm"
|
||||
const { ClientEnvironment } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/ClientEnvironment.sys.mjs"
|
||||
);
|
||||
const { Heartbeat } = ChromeUtils.import(
|
||||
"resource://normandy/lib/Heartbeat.jsm"
|
||||
const { Heartbeat } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/Heartbeat.sys.mjs"
|
||||
);
|
||||
|
||||
const { Uptake } = ChromeUtils.import("resource://normandy/lib/Uptake.jsm");
|
||||
const { NormandyTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/NormandyTestUtils.jsm"
|
||||
const { Uptake } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/Uptake.sys.mjs"
|
||||
);
|
||||
const { NormandyTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/NormandyTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const HOUR_IN_MS = 60 * 60 * 1000;
|
||||
|
|
|
@ -4,26 +4,28 @@ const { Preferences } = ChromeUtils.importESModule(
|
|||
const { AddonTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/AddonTestUtils.jsm"
|
||||
);
|
||||
const { AboutPages } = ChromeUtils.import(
|
||||
"resource://normandy-content/AboutPages.jsm"
|
||||
const { AboutPages } = ChromeUtils.importESModule(
|
||||
"resource://normandy-content/AboutPages.sys.mjs"
|
||||
);
|
||||
const { AddonStudies } = ChromeUtils.import(
|
||||
"resource://normandy/lib/AddonStudies.jsm"
|
||||
const { AddonStudies } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/AddonStudies.sys.mjs"
|
||||
);
|
||||
const { NormandyApi } = ChromeUtils.import(
|
||||
"resource://normandy/lib/NormandyApi.jsm"
|
||||
const { NormandyApi } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/NormandyApi.sys.mjs"
|
||||
);
|
||||
const { TelemetryEvents } = ChromeUtils.import(
|
||||
"resource://normandy/lib/TelemetryEvents.jsm"
|
||||
const { TelemetryEvents } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/TelemetryEvents.sys.mjs"
|
||||
);
|
||||
const { ShowHeartbeatAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/ShowHeartbeatAction.jsm"
|
||||
const { ShowHeartbeatAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/ShowHeartbeatAction.sys.mjs"
|
||||
);
|
||||
|
||||
// The name of this module conflicts with the window.Storage
|
||||
// DOM global - https://developer.mozilla.org/en-US/docs/Web/API/Storage .
|
||||
// eslint-disable-next-line mozilla/no-redeclare-with-import-autofix
|
||||
const { Storage } = ChromeUtils.import("resource://normandy/lib/Storage.jsm");
|
||||
const { Storage } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/Storage.sys.mjs"
|
||||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
TelemetryTestUtils: "resource://testing-common/TelemetryTestUtils.sys.mjs",
|
||||
|
|
|
@ -3,9 +3,11 @@ http://creativecommons.org/publicdomain/zero/1.0/ */
|
|||
|
||||
"use strict";
|
||||
|
||||
const { Normandy } = ChromeUtils.import("resource://normandy/Normandy.jsm");
|
||||
const { NormandyMigrations } = ChromeUtils.import(
|
||||
"resource://normandy/NormandyMigrations.jsm"
|
||||
const { Normandy } = ChromeUtils.importESModule(
|
||||
"resource://normandy/Normandy.sys.mjs"
|
||||
);
|
||||
const { NormandyMigrations } = ChromeUtils.importESModule(
|
||||
"resource://normandy/NormandyMigrations.sys.mjs"
|
||||
);
|
||||
const { PromiseUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PromiseUtils.sys.mjs"
|
||||
|
|
|
@ -3,8 +3,8 @@ http://creativecommons.org/publicdomain/zero/1.0/ */
|
|||
|
||||
"use strict";
|
||||
|
||||
const { PrefUtils } = ChromeUtils.import(
|
||||
"resource://normandy/lib/PrefUtils.jsm"
|
||||
const { PrefUtils } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/PrefUtils.sys.mjs"
|
||||
);
|
||||
|
||||
add_task(function getPrefGetsValues() {
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
const { updateAppInfo } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/AppInfo.sys.mjs"
|
||||
);
|
||||
const { RecipeRunner } = ChromeUtils.import(
|
||||
"resource://normandy/lib/RecipeRunner.jsm"
|
||||
const { RecipeRunner } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/RecipeRunner.sys.mjs"
|
||||
);
|
||||
|
||||
// Test that new build IDs trigger immediate recipe runs
|
||||
|
|
|
@ -4,20 +4,20 @@ const { AddonTestUtils } = ChromeUtils.import(
|
|||
const { ExtensionTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/ExtensionXPCShellUtils.jsm"
|
||||
);
|
||||
const { BranchedAddonStudyAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BranchedAddonStudyAction.jsm"
|
||||
const { BranchedAddonStudyAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/BranchedAddonStudyAction.sys.mjs"
|
||||
);
|
||||
const { BaseAction } = ChromeUtils.import(
|
||||
"resource://normandy/actions/BaseAction.jsm"
|
||||
const { BaseAction } = ChromeUtils.importESModule(
|
||||
"resource://normandy/actions/BaseAction.sys.mjs"
|
||||
);
|
||||
const { TelemetryEvents } = ChromeUtils.import(
|
||||
"resource://normandy/lib/TelemetryEvents.jsm"
|
||||
const { TelemetryEvents } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/TelemetryEvents.sys.mjs"
|
||||
);
|
||||
const { AddonManager } = ChromeUtils.import(
|
||||
"resource://gre/modules/AddonManager.jsm"
|
||||
);
|
||||
const { AddonStudies } = ChromeUtils.import(
|
||||
"resource://normandy/lib/AddonStudies.jsm"
|
||||
const { AddonStudies } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/AddonStudies.sys.mjs"
|
||||
);
|
||||
const { PromiseUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PromiseUtils.sys.mjs"
|
||||
|
@ -94,8 +94,8 @@ decorate_task(
|
|||
// the following two lines avoid false eslint warnings:
|
||||
/* globals browser, ExtensionAPI */
|
||||
/* eslint-disable-next-line no-shadow */
|
||||
const { AddonStudies } = ChromeUtils.import(
|
||||
"resource://normandy/lib/AddonStudies.jsm"
|
||||
const { AddonStudies } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/AddonStudies.sys.mjs"
|
||||
);
|
||||
const { ExtensionCommon } = ChromeUtils.import(
|
||||
"resource://gre/modules/ExtensionCommon.jsm"
|
||||
|
|
|
@ -9,11 +9,11 @@ const { Preferences } = ChromeUtils.importESModule(
|
|||
);
|
||||
const { HttpServer } = ChromeUtils.import("resource://testing-common/httpd.js");
|
||||
|
||||
const { NormandyApi } = ChromeUtils.import(
|
||||
"resource://normandy/lib/NormandyApi.jsm"
|
||||
const { NormandyApi } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/NormandyApi.sys.mjs"
|
||||
);
|
||||
const { NormandyTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/NormandyTestUtils.jsm"
|
||||
const { NormandyTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/NormandyTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const CryptoHash = Components.Constructor(
|
||||
|
|
|
@ -11,18 +11,14 @@ ChromeUtils.defineModuleGetter(
|
|||
"AddonManager",
|
||||
"resource://gre/modules/AddonManager.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"NormandyUtils",
|
||||
"resource://normandy/lib/NormandyUtils.jsm"
|
||||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
AttributionCode: "resource:///modules/AttributionCode.sys.mjs",
|
||||
NormandyUtils: "resource://normandy/lib/NormandyUtils.sys.mjs",
|
||||
ShellService: "resource:///modules/ShellService.sys.mjs",
|
||||
TelemetryArchive: "resource://gre/modules/TelemetryArchive.sys.mjs",
|
||||
TelemetryController: "resource://gre/modules/TelemetryController.sys.mjs",
|
||||
UpdateUtils: "resource://gre/modules/UpdateUtils.sys.mjs",
|
||||
AttributionCode: "resource:///modules/AttributionCode.sys.mjs",
|
||||
WindowsVersionInfo:
|
||||
"resource://gre/modules/components-utils/WindowsVersionInfo.sys.mjs",
|
||||
});
|
||||
|
|
|
@ -3,19 +3,14 @@
|
|||
"use strict";
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
AppConstants: "resource://gre/modules/AppConstants.sys.mjs",
|
||||
ClientEnvironmentBase:
|
||||
"resource://gre/modules/components-utils/ClientEnvironment.sys.mjs",
|
||||
NormandyTestUtils: "resource://testing-common/NormandyTestUtils.sys.mjs",
|
||||
TelemetryController: "resource://gre/modules/TelemetryController.sys.mjs",
|
||||
AppConstants: "resource://gre/modules/AppConstants.sys.mjs",
|
||||
updateAppInfo: "resource://testing-common/AppInfo.sys.mjs",
|
||||
});
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"NormandyTestUtils",
|
||||
"resource://testing-common/NormandyTestUtils.jsm"
|
||||
);
|
||||
|
||||
add_setup(() => {
|
||||
updateAppInfo();
|
||||
});
|
||||
|
|
|
@ -4,18 +4,13 @@
|
|||
|
||||
import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
Normandy: "resource://normandy/Normandy.sys.mjs",
|
||||
TaskScheduler: "resource://gre/modules/TaskScheduler.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
Normandy: "resource://normandy/Normandy.jsm",
|
||||
});
|
||||
|
||||
const PREF_TIMEOUT = "first-startup.timeout";
|
||||
|
||||
/**
|
||||
|
|
|
@ -966,13 +966,17 @@ var dataProviders = {
|
|||
|
||||
const {
|
||||
PreferenceExperiments: NormandyPreferenceStudies,
|
||||
} = ChromeUtils.import("resource://normandy/lib/PreferenceExperiments.jsm");
|
||||
const { AddonStudies: NormandyAddonStudies } = ChromeUtils.import(
|
||||
"resource://normandy/lib/AddonStudies.jsm"
|
||||
} = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/PreferenceExperiments.sys.mjs"
|
||||
);
|
||||
const { AddonStudies: NormandyAddonStudies } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/AddonStudies.sys.mjs"
|
||||
);
|
||||
const {
|
||||
PreferenceRollouts: NormandyPreferenceRollouts,
|
||||
} = ChromeUtils.import("resource://normandy/lib/PreferenceRollouts.jsm");
|
||||
} = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/PreferenceRollouts.sys.mjs"
|
||||
);
|
||||
const { ExperimentManager } = ChromeUtils.importESModule(
|
||||
"resource://nimbus/lib/ExperimentManager.sys.mjs"
|
||||
);
|
||||
|
|
|
@ -16,17 +16,17 @@ const { sinon } = ChromeUtils.importESModule(
|
|||
const { FeatureGate } = ChromeUtils.importESModule(
|
||||
"resource://featuregates/FeatureGate.sys.mjs"
|
||||
);
|
||||
const { PreferenceExperiments } = ChromeUtils.import(
|
||||
"resource://normandy/lib/PreferenceExperiments.jsm"
|
||||
const { PreferenceExperiments } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/PreferenceExperiments.sys.mjs"
|
||||
);
|
||||
const { PreferenceRollouts } = ChromeUtils.import(
|
||||
"resource://normandy/lib/PreferenceRollouts.jsm"
|
||||
const { PreferenceRollouts } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/PreferenceRollouts.sys.mjs"
|
||||
);
|
||||
const { AddonStudies } = ChromeUtils.import(
|
||||
"resource://normandy/lib/AddonStudies.jsm"
|
||||
const { AddonStudies } = ChromeUtils.importESModule(
|
||||
"resource://normandy/lib/AddonStudies.sys.mjs"
|
||||
);
|
||||
const { NormandyTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/NormandyTestUtils.jsm"
|
||||
const { NormandyTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/NormandyTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
NormandyTestUtils.init({ Assert });
|
||||
|
|
Загрузка…
Ссылка в новой задаче