Loading .eslintrc.js +0 −10 Original line number Diff line number Diff line Loading @@ -550,16 +550,6 @@ module.exports = { "dom/push/test/xpcshell/head.js", "dom/push/test/xpcshell/test_broadcast_success.js", "dom/push/test/xpcshell/test_crypto.js", "services/common/tests/unit/head_helpers.js", "services/common/tests/unit/test_uptake_telemetry.js", "services/fxaccounts/tests/xpcshell/test_accounts.js", "services/fxaccounts/tests/xpcshell/test_accounts_device_registration.js", "services/fxaccounts/tests/xpcshell/test_loginmgr_storage.js", "services/fxaccounts/tests/xpcshell/test_oauth_token_storage.js", "services/fxaccounts/tests/xpcshell/test_oauth_tokens.js", "services/fxaccounts/tests/xpcshell/test_web_channel.js", "services/sync/modules-testing/utils.js", "services/sync/tests/unit/test_postqueue.js", "toolkit/components/cloudstorage/tests/unit/test_cloudstorage.js", "toolkit/components/crashes/tests/xpcshell/test_crash_manager.js", "toolkit/components/crashes/tests/xpcshell/test_crash_service.js", Loading services/common/tests/unit/head_helpers.js +5 −9 Original line number Diff line number Diff line Loading @@ -282,19 +282,15 @@ function checkUptakeTelemetry(snapshot1, snapshot2, expectedIncrements) { } async function withFakeChannel(channel, f) { const module = ChromeUtils.import( "resource://services-common/uptake-telemetry.js", null const { Policy } = ChromeUtils.import( "resource://services-common/uptake-telemetry.js" ); const oldPolicy = module.Policy; module.Policy = { ...oldPolicy, getChannel: () => channel, }; let oldGetChannel = Policy.getChannel; Policy.getChannel = () => channel; try { return await f(); } finally { module.Policy = oldPolicy; Policy.getChannel = oldGetChannel; } } Loading services/common/tests/unit/test_uptake_telemetry.js +6 −12 Original line number Diff line number Diff line const { ClientID } = ChromeUtils.import("resource://gre/modules/ClientID.jsm"); const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); const { TelemetryTestUtils } = ChromeUtils.import( "resource://testing-common/TelemetryTestUtils.jsm" ); Loading @@ -10,20 +8,16 @@ const { UptakeTelemetry } = ChromeUtils.import( const COMPONENT = "remotesettings"; async function withFakeClientID(uuid, f) { const module = ChromeUtils.import( "resource://services-common/uptake-telemetry.js", null const { Policy } = ChromeUtils.import( "resource://services-common/uptake-telemetry.js" ); const oldPolicy = module.Policy; module.Policy = { ...oldPolicy, _clientIDHash: null, getClientID: () => Promise.resolve(uuid), }; let oldGetClientID = Policy.getClientID; Policy._clientIDHash = null; Policy.getClientID = () => Promise.resolve(uuid); try { return await f(); } finally { module.Policy = oldPolicy; Policy.getClientID = oldGetClientID; } } Loading services/common/uptake-telemetry.js +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ "use strict"; var EXPORTED_SYMBOLS = ["UptakeTelemetry"]; var EXPORTED_SYMBOLS = ["UptakeTelemetry", "Policy"]; const { XPCOMUtils } = ChromeUtils.import( "resource://gre/modules/XPCOMUtils.jsm" Loading services/fxaccounts/FxAccounts.jsm +2 −1 Original line number Diff line number Diff line Loading @@ -1622,4 +1622,5 @@ XPCOMUtils.defineLazyGetter(this, "fxAccounts", function() { return a; }); var EXPORTED_SYMBOLS = ["fxAccounts", "FxAccounts"]; // `AccountState` is exported for tests. var EXPORTED_SYMBOLS = ["fxAccounts", "FxAccounts", "AccountState"]; Loading
.eslintrc.js +0 −10 Original line number Diff line number Diff line Loading @@ -550,16 +550,6 @@ module.exports = { "dom/push/test/xpcshell/head.js", "dom/push/test/xpcshell/test_broadcast_success.js", "dom/push/test/xpcshell/test_crypto.js", "services/common/tests/unit/head_helpers.js", "services/common/tests/unit/test_uptake_telemetry.js", "services/fxaccounts/tests/xpcshell/test_accounts.js", "services/fxaccounts/tests/xpcshell/test_accounts_device_registration.js", "services/fxaccounts/tests/xpcshell/test_loginmgr_storage.js", "services/fxaccounts/tests/xpcshell/test_oauth_token_storage.js", "services/fxaccounts/tests/xpcshell/test_oauth_tokens.js", "services/fxaccounts/tests/xpcshell/test_web_channel.js", "services/sync/modules-testing/utils.js", "services/sync/tests/unit/test_postqueue.js", "toolkit/components/cloudstorage/tests/unit/test_cloudstorage.js", "toolkit/components/crashes/tests/xpcshell/test_crash_manager.js", "toolkit/components/crashes/tests/xpcshell/test_crash_service.js", Loading
services/common/tests/unit/head_helpers.js +5 −9 Original line number Diff line number Diff line Loading @@ -282,19 +282,15 @@ function checkUptakeTelemetry(snapshot1, snapshot2, expectedIncrements) { } async function withFakeChannel(channel, f) { const module = ChromeUtils.import( "resource://services-common/uptake-telemetry.js", null const { Policy } = ChromeUtils.import( "resource://services-common/uptake-telemetry.js" ); const oldPolicy = module.Policy; module.Policy = { ...oldPolicy, getChannel: () => channel, }; let oldGetChannel = Policy.getChannel; Policy.getChannel = () => channel; try { return await f(); } finally { module.Policy = oldPolicy; Policy.getChannel = oldGetChannel; } } Loading
services/common/tests/unit/test_uptake_telemetry.js +6 −12 Original line number Diff line number Diff line const { ClientID } = ChromeUtils.import("resource://gre/modules/ClientID.jsm"); const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); const { TelemetryTestUtils } = ChromeUtils.import( "resource://testing-common/TelemetryTestUtils.jsm" ); Loading @@ -10,20 +8,16 @@ const { UptakeTelemetry } = ChromeUtils.import( const COMPONENT = "remotesettings"; async function withFakeClientID(uuid, f) { const module = ChromeUtils.import( "resource://services-common/uptake-telemetry.js", null const { Policy } = ChromeUtils.import( "resource://services-common/uptake-telemetry.js" ); const oldPolicy = module.Policy; module.Policy = { ...oldPolicy, _clientIDHash: null, getClientID: () => Promise.resolve(uuid), }; let oldGetClientID = Policy.getClientID; Policy._clientIDHash = null; Policy.getClientID = () => Promise.resolve(uuid); try { return await f(); } finally { module.Policy = oldPolicy; Policy.getClientID = oldGetClientID; } } Loading
services/common/uptake-telemetry.js +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ "use strict"; var EXPORTED_SYMBOLS = ["UptakeTelemetry"]; var EXPORTED_SYMBOLS = ["UptakeTelemetry", "Policy"]; const { XPCOMUtils } = ChromeUtils.import( "resource://gre/modules/XPCOMUtils.jsm" Loading
services/fxaccounts/FxAccounts.jsm +2 −1 Original line number Diff line number Diff line Loading @@ -1622,4 +1622,5 @@ XPCOMUtils.defineLazyGetter(this, "fxAccounts", function() { return a; }); var EXPORTED_SYMBOLS = ["fxAccounts", "FxAccounts"]; // `AccountState` is exported for tests. var EXPORTED_SYMBOLS = ["fxAccounts", "FxAccounts", "AccountState"];