diff --git a/browser/experiments/Experiments.jsm b/browser/experiments/Experiments.jsm index 8dd2e084ab4b..0591853a17df 100644 --- a/browser/experiments/Experiments.jsm +++ b/browser/experiments/Experiments.jsm @@ -1889,7 +1889,7 @@ ExperimentsProvider.prototype = Object.freeze({ recordLastActiveExperiment: function () { if (!gExperimentsEnabled) { - return; + return Promise.resolve(); } if (!this._experiments) { diff --git a/browser/experiments/test/xpcshell/test_healthreport.js b/browser/experiments/test/xpcshell/test_healthreport.js index f7d10b00f001..965348af9b54 100644 --- a/browser/experiments/test/xpcshell/test_healthreport.js +++ b/browser/experiments/test/xpcshell/test_healthreport.js @@ -27,10 +27,16 @@ add_test(function setup() { do_get_profile(); initTestLogging(); + Services.prefs.setBoolPref(PREF_EXPERIMENTS_ENABLED, true); + Services.prefs.setBoolPref(PREF_TELEMETRY_ENABLED, true); + Services.prefs.setBoolPref(PREF_HEALTHREPORT_ENABLED, true); + run_next_test(); }); add_task(function test_constructor() { + Experiments.instance(); + yield Experiments._mainTask; let provider = new ExperimentsProvider(); });