summaryrefslogtreecommitdiffstats
path: root/toolkit/components/telemetry/tests
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/telemetry/tests')
-rw-r--r--toolkit/components/telemetry/tests/addons/signed-webext/.web-extension-id3
-rw-r--r--toolkit/components/telemetry/tests/addons/signed-webext/META-INF/manifest.mf7
-rw-r--r--toolkit/components/telemetry/tests/addons/signed-webext/META-INF/mozilla.rsabin4193 -> 0 bytes
-rw-r--r--toolkit/components/telemetry/tests/addons/signed-webext/META-INF/mozilla.sf4
-rw-r--r--toolkit/components/telemetry/tests/addons/signed-webext/manifest.json12
-rw-r--r--toolkit/components/telemetry/tests/marionette/harness/telemetry_harness/fog_testcase.py2
-rw-r--r--toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js13
-rw-r--r--toolkit/components/telemetry/tests/unit/test_TelemetryReportingPolicy.js6
-rw-r--r--toolkit/components/telemetry/tests/unit/xpcshell.toml1
9 files changed, 17 insertions, 31 deletions
diff --git a/toolkit/components/telemetry/tests/addons/signed-webext/.web-extension-id b/toolkit/components/telemetry/tests/addons/signed-webext/.web-extension-id
deleted file mode 100644
index e78cecf6d6..0000000000
--- a/toolkit/components/telemetry/tests/addons/signed-webext/.web-extension-id
+++ /dev/null
@@ -1,3 +0,0 @@
-# This file was created by https://github.com/mozilla/web-ext
-# Your auto-generated extension ID for addons.mozilla.org is:
-tel-signed-webext@tests.mozilla.org \ No newline at end of file
diff --git a/toolkit/components/telemetry/tests/addons/signed-webext/META-INF/manifest.mf b/toolkit/components/telemetry/tests/addons/signed-webext/META-INF/manifest.mf
deleted file mode 100644
index 6be3a6e32f..0000000000
--- a/toolkit/components/telemetry/tests/addons/signed-webext/META-INF/manifest.mf
+++ /dev/null
@@ -1,7 +0,0 @@
-Manifest-Version: 1.0
-
-Name: manifest.json
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: vh0VF5quc9YIhMhIsZgKcg==
-SHA1-Digest: DNXAbrHJ4ncET5W+qtJl4+45D6s=
-
diff --git a/toolkit/components/telemetry/tests/addons/signed-webext/META-INF/mozilla.rsa b/toolkit/components/telemetry/tests/addons/signed-webext/META-INF/mozilla.rsa
deleted file mode 100644
index b202c515a8..0000000000
--- a/toolkit/components/telemetry/tests/addons/signed-webext/META-INF/mozilla.rsa
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/telemetry/tests/addons/signed-webext/META-INF/mozilla.sf b/toolkit/components/telemetry/tests/addons/signed-webext/META-INF/mozilla.sf
deleted file mode 100644
index 72af14d816..0000000000
--- a/toolkit/components/telemetry/tests/addons/signed-webext/META-INF/mozilla.sf
+++ /dev/null
@@ -1,4 +0,0 @@
-Signature-Version: 1.0
-MD5-Digest-Manifest: tbeA48G5pe86kvUbd4rsXA==
-SHA1-Digest-Manifest: jyvWt2v9XUnYHrvrlSi4BdyZV/0=
-
diff --git a/toolkit/components/telemetry/tests/addons/signed-webext/manifest.json b/toolkit/components/telemetry/tests/addons/signed-webext/manifest.json
deleted file mode 100644
index 437b415fef..0000000000
--- a/toolkit/components/telemetry/tests/addons/signed-webext/manifest.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "manifest_version": 2,
- "name": "XPI Telemetry Signed Test",
- "description": "A signed webextension",
- "version": "1.0",
-
- "applications": {
- "gecko": {
- "id": "tel-signed-webext@tests.mozilla.org"
- }
- }
-}
diff --git a/toolkit/components/telemetry/tests/marionette/harness/telemetry_harness/fog_testcase.py b/toolkit/components/telemetry/tests/marionette/harness/telemetry_harness/fog_testcase.py
index c5bc54e9d2..9bcf29d2f4 100644
--- a/toolkit/components/telemetry/tests/marionette/harness/telemetry_harness/fog_testcase.py
+++ b/toolkit/components/telemetry/tests/marionette/harness/telemetry_harness/fog_testcase.py
@@ -55,6 +55,8 @@ class FOGTestCase(TelemetryTestCase):
"logging.fog_control::*": 5,
"logging.glean::*": 5,
"logging.glean_core::*": 5,
+ # Slow down the user inactivity timeout (bug 1690728)
+ "dom.events.user_interaction_interval": 60000,
}
)
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",