Bug 1466490 - Set Telemetry preference on startup. r=Dexter
authorJan-Erik Rediger <jrediger@mozilla.com>
Tue, 19 Jun 2018 16:16:58 +0200
changeset 479820 d282d6a159659f4e45fb91d3c164f90dcf0a5f46
parent 479819 cd3ecb04a7bc9ace666dc34bd855c60824e0ed4c
child 479821 eb0d3d9a16c67acb93a23c87113d6f445ded8710
push id1757
push userffxbld-merge
push dateFri, 24 Aug 2018 17:02:43 +0000
treeherdermozilla-release@736023aebdb1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersDexter
bugs1466490
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1466490 - Set Telemetry preference on startup. r=Dexter MozReview-Commit-ID: 1ac74K1Leoy
toolkit/components/telemetry/tests/unit/head_GeckoView.js
--- a/toolkit/components/telemetry/tests/unit/head_GeckoView.js
+++ b/toolkit/components/telemetry/tests/unit/head_GeckoView.js
@@ -1,15 +1,16 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/
 */
 "use strict";
 
 ChromeUtils.import("resource://gre/modules/PromiseUtils.jsm", this);
 ChromeUtils.import("resource://gre/modules/Services.jsm", this);
+ChromeUtils.import("resource://gre/modules/TelemetryUtils.jsm", this);
 ChromeUtils.import("resource://testing-common/ContentTaskUtils.jsm", this);
 
 const Telemetry = Services.telemetry;
 const TelemetryGeckoView = Cc["@mozilla.org/telemetry/geckoview-testing;1"]
                              .createInstance(Ci.nsITelemetryGeckoViewTesting);
 
 /**
  * Run a file in the content process.
@@ -54,8 +55,12 @@ async function waitForHistogramSnapshotD
     const data = aKeyed
       ? Telemetry.snapshotKeyedHistograms(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false)
       : Telemetry.snapshotHistograms(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false);
 
     return (aProcessName in data)
            && (aHistogramName in data[aProcessName]);
   });
 }
+
+if (runningInParent) {
+  Services.prefs.setBoolPref(TelemetryUtils.Preferences.OverridePreRelease, true);
+}