Bug 1514890 - Change installation source for addons installed from ActivityStream

This commit is contained in:
Luca Greco 2019-01-29 21:56:54 +01:00 коммит произвёл Kate Hudson
Родитель b8a9467bf6
Коммит 0c323af6d9
2 изменённых файлов: 3 добавлений и 4 удалений

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

@ -246,9 +246,8 @@ const MessageLoaderUtils = {
const aUri = Services.io.newURI(url);
const systemPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
// AddonManager installation source associated to the addons installed from activitystream
// (See Bug 1496167 for a rationale).
const amTelemetryInfo = {source: "activitystream"};
// AddonManager installation source associated to the addons installed from activitystream's CFR
const amTelemetryInfo = {source: "amo"};
const install = await AddonManager.getInstallForURL(aUri.spec, "application/x-xpinstall", null,
null, null, null, null, amTelemetryInfo);
await AddonManager.installAddonFromWebpage("application/x-xpinstall", browser,

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

@ -304,7 +304,7 @@ describe("MessageLoaderUtils", () => {
// Verify that the expected installation source has been passed to the getInstallForURL
// method (See Bug 1496167 for a rationale).
assert.calledWithExactly(getInstallStub, "foo.com", "application/x-xpinstall", null,
null, null, null, null, {source: "activitystream"});
null, null, null, null, {source: "amo"});
});
it("should not call the Addons API on invalid URLs", async () => {
sandbox.stub(global.Services.scriptSecurityManager, "getSystemPrincipal").throws();