Backed out changeset f350dc70a864 (bug 1536877) for XPCShell failures in toolkit/components/extensions/test/xpcshell/test_ext_telemetry.js. a=backout
authorDorel Luca <dluca@mozilla.com>
Fri, 19 Apr 2019 21:10:08 +0300
changeset 526251 b1cb8bd44deeae0e8e0d94f7755b1abb04ef5653
parent 526250 86f6ec90b34b8df2d33d9a9380a2500fd8dfbef9
child 526252 40968d047db7de5ff0790dc9da6277b61d539fe7
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1536877
milestone67.0
backs outf350dc70a86486f45ee7e2414332d9c058445617
Backed out changeset f350dc70a864 (bug 1536877) for XPCShell failures in toolkit/components/extensions/test/xpcshell/test_ext_telemetry.js. a=backout
toolkit/components/extensions/schemas/telemetry.json
toolkit/components/extensions/test/xpcshell/test_ext_telemetry.js
toolkit/components/telemetry/docs/collection/webextension-api.rst
--- a/toolkit/components/extensions/schemas/telemetry.json
+++ b/toolkit/components/extensions/schemas/telemetry.json
@@ -222,17 +222,17 @@
         },
         {
           "name": "object",
           "type": "string",
           "description": "The object name."
         },
         {
           "name": "value",
-          "type": "string",
+          "type": "integer",
           "optional": true,
           "description": "An optional string value to record."
         },
         {
           "name": "extra",
           "type": "object",
           "optional": true,
           "description": "An optional object of the form (string -> string). It should only contain registered extra keys.",
--- a/toolkit/components/extensions/test/xpcshell/test_ext_telemetry.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_telemetry.js
@@ -185,45 +185,16 @@ if (AppConstants.MOZ_BUILD_APP === "brow
     let events = Services.telemetry.snapshotEvents(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, true);
     equal(events.parent.length, 1);
     equal(events.parent[0][1], "telemetry.test");
 
     Services.telemetry.setEventRecordingEnabled("telemetry.test", false);
     Services.telemetry.clearEvents();
   });
 
-  // Bug 1536877
-  add_task(async function test_telemetry_record_event_value_must_be_string() {
-    Services.telemetry.clearEvents();
-    Services.telemetry.setEventRecordingEnabled("telemetry.test", true);
-
-    await run({
-      backgroundScript: async () => {
-        try {
-          await browser.telemetry.recordEvent("telemetry.test", "test1", "object1", "value1");
-          browser.test.notifyPass("record_event_string_value");
-        } catch (ex) {
-          browser.test.fail(`Unexpected exception raised during record_event_value_must_be_string: ${ex}`);
-          browser.test.notifyPass("record_event_string_value");
-          throw ex;
-        }
-      },
-      doneSignal: "record_event_string_value",
-    });
-
-    let events = Services.telemetry.snapshotEvents(Ci.nsITelemetry.DATASET_PRERELEASE_CHANNELS, true);
-    equal(events.parent.length, 1);
-    equal(events.parent[0][1], "telemetry.test");
-    equal(events.parent[0][3], "object1");
-    equal(events.parent[0][4], "value1");
-
-    Services.telemetry.setEventRecordingEnabled("telemetry.test", false);
-    Services.telemetry.clearEvents();
-  });
-
   add_task(async function test_telemetry_register_scalars_string() {
     Services.telemetry.clearScalars();
 
     await run({
       backgroundScript: async () => {
         await browser.telemetry.registerScalars("telemetry.test.dynamic", {
           "webext_string": {
             kind: browser.telemetry.ScalarType.STRING,
--- a/toolkit/components/telemetry/docs/collection/webextension-api.rst
+++ b/toolkit/components/telemetry/docs/collection/webextension-api.rst
@@ -113,17 +113,17 @@ Sets the scalar to the maximum of the cu
 
   browser.telemetry.recordEvent(category, method, object, value, extra);
 
 Record an event in Telemetry. Throws when trying to record an unknown event.
 
 * ``category`` - *(string)* The category name.
 * ``method`` - *(string)* The method name.
 * ``object`` - *(string)* The object name.
-* ``value`` - *(optional, string)* An optional string value to record.
+* ``value`` - *(optional, integer)* An optional string value to record.
 * ``extra`` - *(optional, object)* An optional object of the form (string -> string). It should only contain registered extra keys.
 
 ``registerScalars``
 ~~~~~~~~~~~~~~~~~~~
 
 .. code-block:: js
 
   browser.telemetry.registerScalars(category, data);