Bug 1496161 - Add installTelemetryInfo to converted webext themes installed from the LWTManager. r=aswan

Differential Revision: https://phabricator.services.mozilla.com/D7708

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Luca Greco 2018-10-04 20:47:01 +00:00
Родитель dc7d411fa2
Коммит f0fc628652
2 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -293,7 +293,8 @@ var LightweightThemeManager = {
if ("converted_theme" in parsed) {
const {url, hash} = parsed.converted_theme;
let install = await AddonManager.getInstallForURL(url, "application/x-xpinstall", hash);
let install = await AddonManager.getInstallForURL(url, "application/x-xpinstall", hash,
null, null, null, null, {source: "lwt-converted-theme"});
install.addListener({
onDownloadEnded() {

Просмотреть файл

@ -127,6 +127,10 @@ add_task(async function test_theme_updates() {
"Theme 1 has been updated to an XPI packaged theme");
equal(theme1.userDisabled, true, "Theme 1 is not active");
Assert.deepEqual(theme1.installTelemetryInfo, {
source: "lwt-converted-theme",
}, "Got the expected source on the converted webextension theme");
// Update the current LWT to an XPI
updates["/2"] = {
converted_theme: {
@ -146,6 +150,10 @@ add_task(async function test_theme_updates() {
"Theme 2 has been updated to an XPI packaged theme");
equal(theme2.userDisabled, false, "Theme 2 is active");
Assert.deepEqual(theme2.installTelemetryInfo, {
source: "lwt-converted-theme",
}, "Got the expected source on the converted webextension theme");
// Serve an update with a bad hash, the LWT should remain in place.
updates["/3"] = {
converted_theme: {