diff --git a/toolkit/components/telemetry/tests/addons/extension-2/install.rdf b/toolkit/components/telemetry/tests/addons/extension-2/install.rdf
deleted file mode 100644
index ddb5904f8628..000000000000
--- a/toolkit/components/telemetry/tests/addons/extension-2/install.rdf
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
- telemetry-ext-2@tests.mozilla.org
- 2
- 2
-
-
- Telemetry test extension 2
- Yet another extension that extends twice.
-
-
-
diff --git a/toolkit/components/telemetry/tests/addons/extension/install.rdf b/toolkit/components/telemetry/tests/addons/extension/install.rdf
deleted file mode 100644
index 4b1bd2da7f37..000000000000
--- a/toolkit/components/telemetry/tests/addons/extension/install.rdf
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
- telemetry-ext-1@tests.mozilla.org
- 1
- 2
-
-
- Telemetry test extension
- Yet another extension that extends.
-
-
-
diff --git a/toolkit/components/telemetry/tests/addons/long-fields/install.rdf b/toolkit/components/telemetry/tests/addons/long-fields/install.rdf
deleted file mode 100644
index 23ca7523cfa1..000000000000
--- a/toolkit/components/telemetry/tests/addons/long-fields/install.rdf
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
- tel-longfields-xpi@tests.mozilla.org
- This is a really long addon version, that will get limited to 100 characters. We're much longer, we're at about 116.
-
-
-
- toolkit@mozilla.org
- 0
- *
-
-
-
-
- This is a really long addon name, that will get limited to 100 characters. We're much longer, we're at about 219. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus nullam sodales. Yeah, Latin placeholder.
- This is a really long addon description, that will get limited to 100 characters. We're much longer, we're at about 200. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus nullam sodales.
- true
-
-
-
diff --git a/toolkit/components/telemetry/tests/addons/long-fields/manifest.json b/toolkit/components/telemetry/tests/addons/long-fields/manifest.json
new file mode 100644
index 000000000000..dda713dc24f6
--- /dev/null
+++ b/toolkit/components/telemetry/tests/addons/long-fields/manifest.json
@@ -0,0 +1,12 @@
+{
+ "manifest_version": 2,
+ "name": "This is a really long addon name, that will get limited to 100 characters. We're much longer, we're at about 219. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus nullam sodales. Yeah, Latin placeholder.",
+ "description": "This is a really long addon description, that will get limited to 100 characters. We're much longer, we're at about 200. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus nullam sodales.",
+ "version": "1.0",
+
+ "applications": {
+ "gecko": {
+ "id": "tel-longfields-webext@tests.mozilla.org"
+ }
+ }
+}
diff --git a/toolkit/components/telemetry/tests/addons/restartless/install.rdf b/toolkit/components/telemetry/tests/addons/restartless/install.rdf
deleted file mode 100644
index f6cda9f252c1..000000000000
--- a/toolkit/components/telemetry/tests/addons/restartless/install.rdf
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
- tel-restartless-xpi@tests.mozilla.org
- 1.0
-
-
-
- toolkit@mozilla.org
- 0
- *
-
-
-
-
- XPI Telemetry Restartless Test
- A restartless addon which gets enabled without a reboot.
- true
-
-
-
diff --git a/toolkit/components/telemetry/tests/addons/restartless/manifest.json b/toolkit/components/telemetry/tests/addons/restartless/manifest.json
new file mode 100644
index 000000000000..ad991cc149c5
--- /dev/null
+++ b/toolkit/components/telemetry/tests/addons/restartless/manifest.json
@@ -0,0 +1,12 @@
+{
+ "manifest_version": 2,
+ "name": "XPI Telemetry Restartless Test",
+ "description": "A restartless addon which gets enabled without a reboot.",
+ "version": "1.0",
+
+ "applications": {
+ "gecko": {
+ "id": "tel-restartless-webext@tests.mozilla.org"
+ }
+ }
+}
diff --git a/toolkit/components/telemetry/tests/addons/signed-webext/.web-extension-id b/toolkit/components/telemetry/tests/addons/signed-webext/.web-extension-id
new file mode 100644
index 000000000000..e78cecf6d6e6
--- /dev/null
+++ b/toolkit/components/telemetry/tests/addons/signed-webext/.web-extension-id
@@ -0,0 +1,3 @@
+# 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
new file mode 100644
index 000000000000..6be3a6e32f28
--- /dev/null
+++ b/toolkit/components/telemetry/tests/addons/signed-webext/META-INF/manifest.mf
@@ -0,0 +1,7 @@
+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
new file mode 100644
index 000000000000..b202c515a868
Binary files /dev/null and b/toolkit/components/telemetry/tests/addons/signed-webext/META-INF/mozilla.rsa 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
new file mode 100644
index 000000000000..72af14d816a8
--- /dev/null
+++ b/toolkit/components/telemetry/tests/addons/signed-webext/META-INF/mozilla.sf
@@ -0,0 +1,4 @@
+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
new file mode 100644
index 000000000000..437b415fef5e
--- /dev/null
+++ b/toolkit/components/telemetry/tests/addons/signed-webext/manifest.json
@@ -0,0 +1,12 @@
+{
+ "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/addons/signed/META-INF/manifest.mf b/toolkit/components/telemetry/tests/addons/signed/META-INF/manifest.mf
deleted file mode 100644
index e6e279dbc2f2..000000000000
--- a/toolkit/components/telemetry/tests/addons/signed/META-INF/manifest.mf
+++ /dev/null
@@ -1,7 +0,0 @@
-Manifest-Version: 1.0
-
-Name: install.rdf
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: YEilRfaecTg2bMNPoYqexQ==
-SHA1-Digest: GEnQKM8Coyw83phx/z1oNh327+0=
-
diff --git a/toolkit/components/telemetry/tests/addons/signed/META-INF/mozilla.rsa b/toolkit/components/telemetry/tests/addons/signed/META-INF/mozilla.rsa
deleted file mode 100644
index 8e5a92650e80..000000000000
Binary files a/toolkit/components/telemetry/tests/addons/signed/META-INF/mozilla.rsa and /dev/null differ
diff --git a/toolkit/components/telemetry/tests/addons/signed/META-INF/mozilla.sf b/toolkit/components/telemetry/tests/addons/signed/META-INF/mozilla.sf
deleted file mode 100644
index 21ce46081d05..000000000000
--- a/toolkit/components/telemetry/tests/addons/signed/META-INF/mozilla.sf
+++ /dev/null
@@ -1,4 +0,0 @@
-Signature-Version: 1.0
-MD5-Digest-Manifest: Ko2bKTrwTXCdstWHWqCR4w==
-SHA1-Digest-Manifest: k6+jfNGFxXtDd1cSX0ZoIyQ1cww=
-
diff --git a/toolkit/components/telemetry/tests/addons/signed/install.rdf b/toolkit/components/telemetry/tests/addons/signed/install.rdf
deleted file mode 100644
index 5fdca172c7fb..000000000000
--- a/toolkit/components/telemetry/tests/addons/signed/install.rdf
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
- tel-signed-xpi@tests.mozilla.org
- 1.0
-
-
-
- toolkit@mozilla.org
- 0
- *
-
-
-
-
- XPI Telemetry Signed Test
- A signed addon which gets enabled without a reboot.
- true
-
-
-
diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js b/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
index a511927898cf..1d72a1ea0713 100644
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
+++ b/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
@@ -983,7 +983,7 @@ add_task(async function test_prefDefault() {
add_task(async function test_addonsWatch_InterestingChange() {
const ADDON_INSTALL_URL = gDataRoot + "restartless.xpi";
- const ADDON_ID = "tel-restartless-xpi@tests.mozilla.org";
+ const ADDON_ID = "tel-restartless-webext@tests.mozilla.org";
// We only expect a single notification for each install, uninstall, enable, disable.
const EXPECTED_NOTIFICATIONS = 4;
@@ -1018,10 +1018,12 @@ add_task(async function test_addonsWatch_InterestingChange() {
Assert.ok(!(ADDON_ID in TelemetryEnvironment.currentEnvironment.addons.activeAddons));
checkpointPromise = registerCheckpointPromise(3);
+ let startupPromise = AddonTestUtils.promiseWebExtensionStartup(ADDON_ID);
addon.userDisabled = false;
await checkpointPromise;
assertCheckpoint(3);
Assert.ok(ADDON_ID in TelemetryEnvironment.currentEnvironment.addons.activeAddons);
+ await startupPromise;
checkpointPromise = registerCheckpointPromise(4);
await AddonManagerTesting.uninstallAddonByID(ADDON_ID);
@@ -1119,7 +1121,7 @@ add_task(async function test_addonsWatch_NotInterestingChange() {
add_task(async function test_addonsAndPlugins() {
const ADDON_INSTALL_URL = gDataRoot + "restartless.xpi";
- const ADDON_ID = "tel-restartless-xpi@tests.mozilla.org";
+ const ADDON_ID = "tel-restartless-webext@tests.mozilla.org";
const ADDON_INSTALL_DATE = truncateToDays(Date.now());
const EXPECTED_ADDON_DATA = {
blocklisted: false,
@@ -1136,8 +1138,8 @@ add_task(async function test_addonsAndPlugins() {
updateDay: ADDON_INSTALL_DATE,
signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_PRIVILEGED : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
isSystem: false,
- isWebExtension: false,
- multiprocessCompatible: false,
+ isWebExtension: true,
+ multiprocessCompatible: true,
};
const SYSTEM_ADDON_ID = "tel-system-xpi@tests.mozilla.org";
const EXPECTED_SYSTEM_ADDON_DATA = {
@@ -1272,12 +1274,14 @@ add_task(async function test_addonsAndPlugins() {
});
add_task(async function test_signedAddon() {
- const ADDON_INSTALL_URL = gDataRoot + "signed.xpi";
- const ADDON_ID = "tel-signed-xpi@tests.mozilla.org";
+ AddonTestUtils.useRealCertChecks = true;
+
+ const ADDON_INSTALL_URL = gDataRoot + "signed-webext.xpi";
+ const ADDON_ID = "tel-signed-webext@tests.mozilla.org";
const ADDON_INSTALL_DATE = truncateToDays(Date.now());
const EXPECTED_ADDON_DATA = {
blocklisted: false,
- description: "A signed addon which gets enabled without a reboot.",
+ description: "A signed webextension",
name: "XPI Telemetry Signed Test",
userDisabled: false,
appDisabled: false,
@@ -1310,11 +1314,13 @@ add_task(async function test_signedAddon() {
for (let f in EXPECTED_ADDON_DATA) {
Assert.equal(targetAddon[f], EXPECTED_ADDON_DATA[f], f + " must have the correct value.");
}
+
+ AddonTestUtils.useRealCertChecks = false;
});
add_task(async function test_addonsFieldsLimit() {
const ADDON_INSTALL_URL = gDataRoot + "long-fields.xpi";
- const ADDON_ID = "tel-longfields-xpi@tests.mozilla.org";
+ const ADDON_ID = "tel-longfields-webext@tests.mozilla.org";
// Install the addon and wait for the TelemetryEnvironment to pick it up.
let deferred = PromiseUtils.defer();
@@ -1351,7 +1357,7 @@ add_task(async function test_collectionWithbrokenAddonData() {
};
const ADDON_INSTALL_URL = gDataRoot + "restartless.xpi";
- const ADDON_ID = "tel-restartless-xpi@tests.mozilla.org";
+ const ADDON_ID = "tel-restartless-webext@tests.mozilla.org";
const ADDON_INSTALL_DATE = truncateToDays(Date.now());
const EXPECTED_ADDON_DATA = {
blocklisted: false,
diff --git a/toolkit/components/telemetry/tests/unit/xpcshell.ini b/toolkit/components/telemetry/tests/unit/xpcshell.ini
index ea8ce41fbe4b..cbc7aede3b1e 100644
--- a/toolkit/components/telemetry/tests/unit/xpcshell.ini
+++ b/toolkit/components/telemetry/tests/unit/xpcshell.ini
@@ -8,8 +8,6 @@ support-files =
../search/searchTest.jar
dictionary.xpi
experiment.xpi
- extension.xpi
- extension-2.xpi
engine.xml
system.xpi
restartless.xpi
@@ -22,8 +20,6 @@ support-files =
generated-files =
dictionary.xpi
experiment.xpi
- extension.xpi
- extension-2.xpi
system.xpi
restartless.xpi
theme.xpi