Bug 1486763 - Add installTelemetryInfo to addon installed from Firefox Sync. r=markh

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Luca Greco 2018-10-03 06:58:23 +00:00
Родитель 91d9e6e950
Коммит e368443b29
2 изменённых файлов: 6 добавлений и 2 удалений

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

@ -38,7 +38,8 @@ AddonUtilsInternal.prototype = {
// of sourceURI rewriting, we can avoid having to reconstruct the
// AddonInstall.
return AddonManager.getInstallForURL(
addon.sourceURI.spec, "application/x-xpinstall", undefined, addon.name, addon.iconURL, addon.version
addon.sourceURI.spec, "application/x-xpinstall", undefined, addon.name, addon.iconURL, addon.version,
null, {source: "sync"}
);
},

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

@ -112,7 +112,10 @@ add_task(async function test_source_uri_rewrite() {
const install = await AddonUtils.getInstallFromSearchResult(addon);
Assert.equal(SERVER_ADDRESS + "/require.xpi?src=sync",
install.sourceURI.spec);
install.sourceURI.spec);
Assert.deepEqual(install.installTelemetryInfo, {source: "sync"},
"Got the expected installTelemetryInfo");
return {id: addon.id, addon, install};
};