Backed out changeset a8c4f87b7c3d (bug 1443605) for browser-chrome failures at browser/components/uitour/test/browser_UITour_registerPageID.js on a CLOSED TREE
authorCoroiu Cristina <ccoroiu@mozilla.com>
Thu, 22 Mar 2018 01:16:36 +0200
changeset 409411 9185d9c69f0ed9ccc1a1d5eacf5beb8df38af060
parent 409410 73e7cea1a75ec05e97c6a305c0c9caf027ab67d5
child 409412 ff30955a00d2f6cbba9288b3ba2b7b749a577628
push id33687
push userapavel@mozilla.com
push dateThu, 22 Mar 2018 09:31:48 +0000
treeherdermozilla-central@7771df14ea18 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1443605
milestone61.0a1
backs outa8c4f87b7c3d4e049deb5ba637abd9b80dafc995
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
Backed out changeset a8c4f87b7c3d (bug 1443605) for browser-chrome failures at browser/components/uitour/test/browser_UITour_registerPageID.js on a CLOSED TREE
toolkit/components/telemetry/TelemetrySession.jsm
toolkit/components/telemetry/UITelemetry.jsm
toolkit/components/telemetry/docs/data/main-ping.rst
toolkit/components/telemetry/tests/unit/test_TelemetrySession.js
--- a/toolkit/components/telemetry/TelemetrySession.jsm
+++ b/toolkit/components/telemetry/TelemetrySession.jsm
@@ -753,16 +753,17 @@ var Impl = {
       ChromeUtils.import("resource://gre/modules/TelemetryTimestamps.jsm", o);
       appTimestamps = o.TelemetryTimestamps.get();
     } catch (ex) {}
 
     // Only submit this if the extended set is enabled.
     if (!Utils.isContentProcess && Telemetry.canRecordExtended) {
       try {
         ret.addonManager = AddonManagerPrivate.getSimpleMeasures();
+        ret.UITelemetry = UITelemetry.getSimpleMeasures();
       } catch (ex) {}
     }
 
     if (si.process) {
       for (let field of Object.keys(si)) {
         if (field == "process")
           continue;
         ret[field] = si[field] - si.process;
--- a/toolkit/components/telemetry/UITelemetry.jsm
+++ b/toolkit/components/telemetry/UITelemetry.jsm
@@ -3,36 +3,31 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = [
   "UITelemetry",
 ];
 
-ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm", this);
 ChromeUtils.import("resource://gre/modules/TelemetryUtils.jsm", this);
 
 /**
  * UITelemetry is a helper JSM used to record UI specific telemetry events.
  *
  * It implements nsIUITelemetryObserver, defined in nsIAndroidBridge.idl.
  */
 var UITelemetry = {
   _enabled: undefined,
   _activeSessions: {},
   _measurements: [],
 
   // Lazily decide whether telemetry is enabled.
   get enabled() {
-    if (AppConstants.platform != "android") {
-      return false;
-    }
-
     if (this._enabled !== undefined) {
       return this._enabled;
     }
 
     // Set an observer to watch for changes at runtime.
     Services.prefs.addObserver(TelemetryUtils.Preferences.TelemetryEnabled, this);
     Services.obs.addObserver(this, "profile-before-change");
 
--- a/toolkit/components/telemetry/docs/data/main-ping.rst
+++ b/toolkit/components/telemetry/docs/data/main-ping.rst
@@ -159,18 +159,16 @@ uptime
 A non-monotonic integer representing the number of minutes the session has been alive.
 
 addonManager
 ~~~~~~~~~~~~
 Only available in the extended set of measures, it contains a set of counters related to Addons. See `here <https://dxr.mozilla.org/mozilla-central/search?q=%22AddonManagerPrivate.recordSimpleMeasure%22&redirect=false&case=true>`__ for a list of recorded measures.
 
 UITelemetry
 ~~~~~~~~~~~
-As of Firefox 61 this section is no longer present.
-
 Only available in the extended set of measures. For more see :ref:`uitelemetry`.
 
 startupInterrupted
 ~~~~~~~~~~~~~~~~~~
 A boolean set to true if startup was interrupted by an interactive prompt.
 
 js
 ~~
@@ -629,16 +627,20 @@ Structure:
           "creator": "Mozilla & Android Open Source Project",
           "startup_MS": 30
         },
         ...
       },
       ...
     }
 
+UITelemetry
+-----------
+See the ``UITelemetry data format`` documentation.
+
 slowSQL
 -------
 This section contains the information about the slow SQL queries for both the main and other threads. The execution of an SQL statement is considered slow if it takes 50ms or more on the main thread or 100ms or more on other threads. Slow SQL statements will be automatically trimmed to 1000 characters. This limit doesn't include the ellipsis and database name, that are appended at the end of the stored statement.
 
 Structure:
 
 .. code-block:: js
 
--- a/toolkit/components/telemetry/tests/unit/test_TelemetrySession.js
+++ b/toolkit/components/telemetry/tests/unit/test_TelemetrySession.js
@@ -2106,17 +2106,17 @@ add_task(async function test_pingExtende
   // We check this one separately so that we can reuse EXTENDED_PAYLOAD_FIELDS below, since
   // slowSQLStartup might not be there.
   Assert.ok(!("slowSQLStartup" in ping.payload),
             "slowSQLStartup must not be sent if the extended set is off");
 
   Assert.ok(!("addonManager" in ping.payload.simpleMeasurements),
             "addonManager must not be sent if the extended set is off.");
   Assert.ok(!("UITelemetry" in ping.payload.simpleMeasurements),
-            "UITelemetry must not be sent.");
+            "UITelemetry must not be sent if the extended set is off.");
 
   // Restore the preference.
   Telemetry.canRecordExtended = true;
 
   // Send a new ping that should contain the extended data.
   await sendPing();
   ping = await PingServer.promiseNextPing();
   checkPingFormat(ping, PING_TYPE_MAIN, true, true);
@@ -2124,18 +2124,18 @@ add_task(async function test_pingExtende
   // Check that the payload now contains extended statistics fields.
   for (let f in EXTENDED_PAYLOAD_FIELDS) {
     Assert.ok(EXTENDED_PAYLOAD_FIELDS[f] in ping.payload,
               EXTENDED_PAYLOAD_FIELDS[f] + " must be in the payload if the extended set is on.");
   }
 
   Assert.ok("addonManager" in ping.payload.simpleMeasurements,
             "addonManager must be sent if the extended set is on.");
-  Assert.ok(!("UITelemetry" in ping.payload.simpleMeasurements),
-            "UITelemetry must not be sent.");
+  Assert.ok("UITelemetry" in ping.payload.simpleMeasurements,
+            "UITelemetry must be sent if the extended set is on.");
 
   await TelemetryController.testShutdown();
 });
 
 add_task(async function test_schedulerUserIdle() {
   if (gIsAndroid) {
     // We don't have the aborted session or the daily ping here.
     return;