Bug 1132192 - Enable org.mozilla.searches.engines by default in FHR. r=gps, a=lsblakk
authorBenjamin Smedberg <benjamin@smedbergs.us>
Thu, 05 Mar 2015 14:45:17 -0500
changeset 250355 7949e470a547
parent 250354 b8c7154fab60
child 250356 b526678ba6d2
push id4555
push userryanvm@gmail.com
push date2015-03-11 19:14 +0000
treeherdermozilla-beta@7949e470a547 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps, lsblakk
bugs1132192
milestone37.0
Bug 1132192 - Enable org.mozilla.searches.engines by default in FHR. r=gps, a=lsblakk
services/healthreport/providers.jsm
services/healthreport/tests/xpcshell/test_provider_searches.js
--- a/services/healthreport/providers.jsm
+++ b/services/healthreport/providers.jsm
@@ -1626,21 +1626,16 @@ this.SearchesProvider.prototype = Object
     Services.search.init(function onInitComplete () {
       deferred.resolve();
     });
     return deferred.promise;
   },
 
   collectDailyData: function () {
     return this.storage.enqueueTransaction(function getDaily() {
-      // We currently only record this if Telemetry is enabled.
-      if (!isTelemetryEnabled(this._prefs)) {
-        return;
-      }
-
       let m = this.getMeasurement(SearchEnginesMeasurement1.prototype.name,
                                   SearchEnginesMeasurement1.prototype.version);
 
       let engine;
       try {
         engine = Services.search.defaultEngine;
       } catch (e) {}
       let name;
--- a/services/healthreport/tests/xpcshell/test_provider_searches.js
+++ b/services/healthreport/tests/xpcshell/test_provider_searches.js
@@ -143,30 +143,19 @@ add_task(function* test_includes_other_f
 
 add_task(function* test_default_search_engine() {
   let storage = yield Metrics.Storage("default_search_engine");
   let provider = new SearchesProvider();
   yield provider.init(storage);
 
   let m = provider.getMeasurement("engines", 1);
 
-  // Ensure no collection if Telemetry not enabled.
-  Services.prefs.setBoolPref("toolkit.telemetry.enabled", false);
-
   let now = new Date();
   yield provider.collectDailyData();
-
   let data = yield m.getValues();
-  Assert.equal(data.days.hasDay(now), false);
-
-  // Now enable telemetry and ensure we populate.
-  Services.prefs.setBoolPref("toolkit.telemetry.enabled", true);
-
-  yield provider.collectDailyData();
-  data = yield m.getValues();
   Assert.ok(data.days.hasDay(now));
 
   let day = data.days.getDay(now);
   Assert.equal(day.size, 1);
   Assert.ok(day.has("default"));
 
   // test environment doesn't have a default engine.
   Assert.equal(day.get("default"), "NONE");