Bug 1542842 - Fix remaining references to undefined Ci.nsITelemetry constant in WebExtensions tests. r=Standard8
authorLuca Greco <lgreco@mozilla.com>
Tue, 16 Apr 2019 12:58:30 +0000
changeset 528478 82531c8a2d735ab35d6ba6d5a9233d8f074359ed
parent 528475 f0c87ec1d694d43288d8ec0a01e290e753ccfeb4
child 528479 6c23754dcb407a1e1138a87abba334b058f5c164
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8
bugs1542842
milestone68.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 1542842 - Fix remaining references to undefined Ci.nsITelemetry constant in WebExtensions tests. r=Standard8 Differential Revision: https://phabricator.services.mozilla.com/D27650
browser/components/extensions/test/browser/browser_ext_browserAction_contextMenu.js
toolkit/components/extensions/test/xpcshell/test_ext_incognito.js
--- a/browser/components/extensions/test/browser/browser_ext_browserAction_contextMenu.js
+++ b/browser/components/extensions/test/browser/browser_ext_browserAction_contextMenu.js
@@ -67,17 +67,17 @@ function assertTelemetryMatches(events) 
     .map(relatedEvent => relatedEvent.slice(2, 6));
 
   // Events are now [method, object, value, extra] as expected.
   Assert.deepEqual(relatedEvents, events, "The events are recorded correctly");
 }
 
 add_task(async function test_setup() {
   // Clear any previosuly collected telemetry event.
-  Services.telemetry.snapshotEvents(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, true);
+  Services.telemetry.clearEvents();
 });
 
 add_task(async function browseraction_popup_contextmenu() {
   let extension = ExtensionTestUtils.loadExtension(extData);
   await extension.startup();
 
   await clickBrowserAction(extension, window);
 
--- a/toolkit/components/extensions/test/xpcshell/test_ext_incognito.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_incognito.js
@@ -7,17 +7,17 @@ const {AddonManager} = ChromeUtils.impor
 AddonTestUtils.init(this);
 AddonTestUtils.overrideCertDB();
 AddonTestUtils.createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "42");
 AddonTestUtils.usePrivilegedSignatures = false;
 
 // Assert on the expected "addonsManager.action" telemetry events (and optional filter events to verify
 // by using a given actionType).
 function assertActionAMTelemetryEvent(expectedActionEvents, assertMessage, {actionType} = {}) {
-  const snapshot = Services.telemetry.snapshotEvents(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, true);
+  const snapshot = Services.telemetry.snapshotEvents(Ci.nsITelemetry.DATASET_PRERELEASE_CHANNELS, true);
 
   ok(snapshot.parent && snapshot.parent.length > 0, "Got parent telemetry events in the snapshot");
 
   const events = snapshot.parent.filter(([timestamp, category, method, object, value, extra]) => {
     return category === "addonsManager" && method === "action" && (
       !actionType ? true : extra && extra.action === actionType
     );
   }).map(([timestamp, category, method, object, value, extra]) => {