зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
91d9e6e950
Коммит
e368443b29
|
@ -38,7 +38,8 @@ AddonUtilsInternal.prototype = {
|
||||||
// of sourceURI rewriting, we can avoid having to reconstruct the
|
// of sourceURI rewriting, we can avoid having to reconstruct the
|
||||||
// AddonInstall.
|
// AddonInstall.
|
||||||
return AddonManager.getInstallForURL(
|
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);
|
const install = await AddonUtils.getInstallFromSearchResult(addon);
|
||||||
Assert.equal(SERVER_ADDRESS + "/require.xpi?src=sync",
|
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};
|
return {id: addon.id, addon, install};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче