diff options
Diffstat (limited to '')
3 files changed, 15 insertions, 5 deletions
diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js b/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js index a67788623d..9990d83fdf 100644 --- a/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js +++ b/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js @@ -715,16 +715,18 @@ add_task(async function test_addons() { add_task(async function test_signedAddon() { AddonTestUtils.useRealCertChecks = true; - const ADDON_INSTALL_URL = gDataRoot + "signed-webext.xpi"; - const ADDON_ID = "tel-signed-webext@tests.mozilla.org"; + const { PKCS7_WITH_SHA1, COSE_WITH_SHA256 } = Ci.nsIAppSignatureInfo; + + const ADDON_INSTALL_URL = gDataRoot + "amosigned.xpi"; + const ADDON_ID = "amosigned-xpi@tests.mozilla.org"; const ADDON_INSTALL_DATE = truncateToDays(Date.now()); const EXPECTED_ADDON_DATA = { blocklisted: false, - description: "A signed webextension", - name: "XPI Telemetry Signed Test", + description: null, + name: "XPI Test", userDisabled: false, appDisabled: false, - version: "1.0", + version: "2.2", scope: 1, type: "extension", foreignInstall: false, @@ -732,6 +734,7 @@ add_task(async function test_signedAddon() { installDay: ADDON_INSTALL_DATE, updateDay: ADDON_INSTALL_DATE, signedState: AddonManager.SIGNEDSTATE_SIGNED, + signedTypes: JSON.stringify([COSE_WITH_SHA256, PKCS7_WITH_SHA1]), quarantineIgnoredByUser: false, // quarantineIgnoredByApp expected to be false because // the test addon is signed as a non-privileged (see signedState), diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryReportingPolicy.js b/toolkit/components/telemetry/tests/unit/test_TelemetryReportingPolicy.js index 01041172d0..df5dc151ad 100644 --- a/toolkit/components/telemetry/tests/unit/test_TelemetryReportingPolicy.js +++ b/toolkit/components/telemetry/tests/unit/test_TelemetryReportingPolicy.js @@ -199,6 +199,12 @@ add_task(async function test_prefs() { "Accepting the policy again should let us upload data." ); + // macOS has the app.update.channel pref locked. Check if it needs to be + // unlocked before proceeding with the test. + if (Services.prefs.getDefaultBranch("").prefIsLocked("app.update.channel")) { + Services.prefs.getDefaultBranch("").unlockPref("app.update.channel"); + } + // Set a new, per channel, minimum policy version. Start by setting a test current channel. Services.prefs .getDefaultBranch("") diff --git a/toolkit/components/telemetry/tests/unit/xpcshell.toml b/toolkit/components/telemetry/tests/unit/xpcshell.toml index dbff9c627c..0c660888ed 100644 --- a/toolkit/components/telemetry/tests/unit/xpcshell.toml +++ b/toolkit/components/telemetry/tests/unit/xpcshell.toml @@ -17,6 +17,7 @@ support-files = [ "testUnicodePDBAArch64.dll", "testNoPDBAArch64.dll", "!/toolkit/mozapps/extensions/test/xpcshell/head_addons.js", + "../../../../mozapps/extensions/test/xpinstall/amosigned.xpi", ] generated-files = [ "system.xpi", |