diff --git a/services/sync/modules/addonutils.js b/services/sync/modules/addonutils.js index c3887c564c22..e087a5fd0e0f 100644 --- a/services/sync/modules/addonutils.js +++ b/services/sync/modules/addonutils.js @@ -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"} ); }, diff --git a/services/sync/tests/unit/test_addon_utils.js b/services/sync/tests/unit/test_addon_utils.js index d459a178c00a..84d325369fcd 100644 --- a/services/sync/tests/unit/test_addon_utils.js +++ b/services/sync/tests/unit/test_addon_utils.js @@ -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}; };