mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 1578885 - use AttributionCode directly from ClientEnvironment, rather than Telemetry r=leplatrem
Differential Revision: https://phabricator.services.mozilla.com/D45433 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
9a9c5a8311
commit
ab637aa92b
@ -42,6 +42,12 @@ ChromeUtils.defineModuleGetter(
|
||||
"resource://gre/modules/FirstStartup.jsm"
|
||||
);
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"AttributionCode",
|
||||
"resource:///modules/AttributionCode.jsm"
|
||||
);
|
||||
|
||||
var EXPORTED_SYMBOLS = ["ClientEnvironmentBase"];
|
||||
|
||||
/**
|
||||
@ -217,4 +223,8 @@ class ClientEnvironmentBase {
|
||||
return rv;
|
||||
})();
|
||||
}
|
||||
|
||||
static get attribution() {
|
||||
return AttributionCode.getAttrDataAsync();
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ add_task(async () => {
|
||||
equal(os.darwinVersion, null, "Darwin version should not be set");
|
||||
}
|
||||
|
||||
// if on Mac, Mac versions should be set, and Windows versions should not b e
|
||||
// if on Mac, Mac versions should be set, and Windows versions should not be
|
||||
if (os.isMac) {
|
||||
equal(typeof os.macVersion, "number", "Mac version should be a number");
|
||||
equal(
|
||||
@ -72,3 +72,15 @@ add_task(async () => {
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
add_task(async () => {
|
||||
try {
|
||||
await ClientEnvironmentBase.attribution;
|
||||
} catch (ex) {
|
||||
equal(
|
||||
ex.name,
|
||||
"NS_ERROR_FILE_NOT_FOUND",
|
||||
"Test environment does not have attribution data"
|
||||
);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user