Bug 1443608 - Stop reporting legacy Telemetry component Telemetry Experiments. r=chutten

This commit is contained in:
Jan-Erik Rediger 2018-03-20 14:45:30 +01:00
parent 898ce47974
commit bb7af57fdc
3 changed files with 5 additions and 22 deletions

View File

@ -856,21 +856,7 @@ EnvironmentAddonBuilder.prototype = {
* @return Object containing the active experiment data.
*/
_getActiveExperiment() {
let experimentInfo = {};
try {
let scope = {};
ChromeUtils.import("resource:///modules/experiments/Experiments.jsm", scope);
let experiments = scope.Experiments.instance();
let activeExperiment = experiments.getActiveExperimentID();
if (activeExperiment) {
experimentInfo.id = activeExperiment;
experimentInfo.branch = experiments.getActiveExperimentBranch();
}
} catch (e) {
// If this is not Firefox, the import will fail.
}
return experimentInfo;
return {};
},
};

View File

@ -264,7 +264,7 @@ Structure:
},
...
},
activeExperiment: { // section is empty if there's no active experiment
activeExperiment: { // obsolete in firefox 61, section is empty if there's no active experiment
id: <string>, // id
branch: <string>, // branch name
},
@ -417,4 +417,4 @@ Just like activePlugins, this will report dummy values until the blocklist is lo
experiments
-----------
For each experiment we collect the ``id`` and the ``branch`` the client is enrolled in. Both fields are truncated to 100 characters and a warning is printed when that happens. This section will eventually supersede ``addons/activeExperiment``.
For each experiment we collect the ``id`` and the ``branch`` the client is enrolled in. Both fields are truncated to 100 characters and a warning is printed when that happens.

View File

@ -820,12 +820,9 @@ function checkAddonsSection(data, expectBrokenAddons, partialAddonsRecords) {
checkActiveGMPlugin(activeGMPlugins[gmPlugin]);
}
// Check the active Experiment
// Check that we don't send Experiment Telemetry
let experiment = data.addons.activeExperiment;
if (Object.keys(experiment).length !== 0) {
Assert.ok(checkString(experiment.id));
Assert.ok(checkString(experiment.branch));
}
Assert.equal(Object.keys(experiment).length, 0);
// Check persona
Assert.ok(checkNullOrString(data.addons.persona));