From e5fe9cdf14a0046918a34cf563f5c073c1d2c5bd Mon Sep 17 00:00:00 2001 From: Georg Fritzsche Date: Tue, 15 Apr 2014 18:12:26 +0200 Subject: [PATCH] Bug 993084 - Fix experiments health report provider test. r=bsmedberg --- browser/experiments/Experiments.jsm | 2 +- browser/experiments/test/xpcshell/test_healthreport.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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(); });