mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 13:25:37 +00:00
Bug 1486761 - Add installTelemetryInfo to addon installed from EnterprisePolicies. r=mkaply
Differential Revision: https://phabricator.services.mozilla.com/D5549 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
0b01108591
commit
e5063cc5ef
@ -433,7 +433,8 @@ var Policies = {
|
||||
}
|
||||
url = Services.io.newFileURI(xpiFile).spec;
|
||||
}
|
||||
AddonManager.getInstallForURL(url, "application/x-xpinstall").then(install => {
|
||||
AddonManager.getInstallForURL(url, "application/x-xpinstall", null, null, null, null, null,
|
||||
{source: "enterprise-policy"}).then(install => {
|
||||
if (install.addon && install.addon.appDisabled) {
|
||||
log.error(`Incompatible add-on - ${location}`);
|
||||
install.cancel();
|
||||
|
@ -21,6 +21,9 @@ add_task(async function test_addon_install() {
|
||||
await installPromise;
|
||||
let addon = await AddonManager.getAddonByID(addonID);
|
||||
isnot(addon, null, "Addon not installed.");
|
||||
|
||||
Assert.deepEqual(addon.installTelemetryInfo, {source: "enterprise-policy"},
|
||||
"Got the expected addon.installTelemetryInfo");
|
||||
});
|
||||
|
||||
add_task(async function test_addon_locked() {
|
||||
|
Loading…
Reference in New Issue
Block a user