Bug 1528255 - In browser_UsageTelemetry*, correct the checks for the urlbar navigation scalar to only look at the specific scalar to avoid intermittents. r=mak
authorMark Banner <standard8@mozilla.com>
Tue, 19 Feb 2019 09:46:44 +0000
changeset 459889 e08d102e6d59795b95d55726254369d7d722ad4a
parent 459888 3924d1ec16af9553a1574c0cc87cbd34d695111b
child 459890 6d27c85a2ec3384204f191956535eb8f06202981
push id78449
push usermbanner@mozilla.com
push dateTue, 19 Feb 2019 12:43:09 +0000
treeherderautoland@e08d102e6d59 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs1528255
milestone67.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 1528255 - In browser_UsageTelemetry*, correct the checks for the urlbar navigation scalar to only look at the specific scalar to avoid intermittents. r=mak Differential Revision: https://phabricator.services.mozilla.com/D20198
browser/modules/test/browser/browser.ini
browser/modules/test/browser/browser_UsageTelemetry_urlbar_extension.js
browser/modules/test/browser/browser_UsageTelemetry_urlbar_places.js
browser/modules/test/browser/browser_UsageTelemetry_urlbar_remotetab.js
--- a/browser/modules/test/browser/browser.ini
+++ b/browser/modules/test/browser/browser.ini
@@ -29,21 +29,18 @@ skip-if = os != win || (os == win && bit
 run-if = crashreporter
 [browser_urlBar_zoom.js]
 [browser_UsageTelemetry.js]
 [browser_UsageTelemetry_domains.js]
 [browser_UsageTelemetry_private_and_restore.js]
 skip-if = verify && debug
 [browser_UsageTelemetry_uniqueOriginsVisitedInPast24Hours.js]
 [browser_UsageTelemetry_urlbar_extension.js]
-skip-if = verify && debug && os == linux && bits == 64 # Bug 1528255 - Perma orange on verify linux64.
 [browser_UsageTelemetry_urlbar_places.js]
-skip-if = verify && debug && os == linux && bits == 64 # Bug 1528255 - Perma orange on verify linux64.
 [browser_UsageTelemetry_urlbar_remotetab.js]
-skip-if = verify && debug && os == linux && bits == 64 # Bug 1528255 - Perma orange on verify linux64.
 [browser_UsageTelemetry_urlbar.js]
 support-files =
   usageTelemetrySearchSuggestions.sjs
   usageTelemetrySearchSuggestions.xml
 [browser_UsageTelemetry_searchbar.js]
 support-files =
   usageTelemetrySearchSuggestions.sjs
   usageTelemetrySearchSuggestions.xml
--- a/browser/modules/test/browser/browser_UsageTelemetry_urlbar_extension.js
+++ b/browser/modules/test/browser/browser_UsageTelemetry_urlbar_extension.js
@@ -13,27 +13,26 @@ const SCALAR_URLBAR = "browser.engagemen
 XPCOMUtils.defineLazyModuleGetters(this, {
   UrlbarTestUtils: "resource://testing-common/UrlbarTestUtils.jsm",
   URLBAR_SELECTED_RESULT_TYPES: "resource:///modules/BrowserUsageTelemetry.jsm",
   URLBAR_SELECTED_RESULT_METHODS: "resource:///modules/BrowserUsageTelemetry.jsm",
 });
 
 function assertSearchTelemetryEmpty(search_hist) {
   const scalars = TelemetryTestUtils.getProcessScalars("parent", true, false);
-  Assert.equal(Object.keys(scalars).length, 0,
-    `Should not have recorded ${SCALAR_URLBAR}`);
+  Assert.ok(!(SCALAR_URLBAR in scalars), `Should not have recorded ${SCALAR_URLBAR}`);
 
   // Make sure SEARCH_COUNTS contains identical values.
   TelemetryTestUtils.assertKeyedHistogramSum(search_hist, "other-MozSearch.urlbar", undefined);
   TelemetryTestUtils.assertKeyedHistogramSum(search_hist, "other-MozSearch.alias", undefined);
 
   // Also check events.
   let events = Services.telemetry.snapshotEvents(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false);
   events = (events.parent || []).filter(e => e[1] == "navigation" && e[2] == "search");
-  Assert.equal(events.length, 0, "Should not have recorded any events");
+  Assert.deepEqual(events, [], "Should not have recorded any navigation search events");
 }
 
 function snapshotHistograms() {
   Services.telemetry.clearScalars();
   Services.telemetry.clearEvents();
   return {
     resultIndexHist: TelemetryTestUtils.getAndClearHistogram("FX_URLBAR_SELECTED_RESULT_INDEX"),
     resultTypeHist: TelemetryTestUtils.getAndClearHistogram("FX_URLBAR_SELECTED_RESULT_TYPE"),
--- a/browser/modules/test/browser/browser_UsageTelemetry_urlbar_places.js
+++ b/browser/modules/test/browser/browser_UsageTelemetry_urlbar_places.js
@@ -21,27 +21,26 @@ XPCOMUtils.defineLazyModuleGetters(this,
 });
 
 function searchInAwesomebar(inputText, win = window) {
   return UrlbarTestUtils.promiseAutocompleteResultPopup(win, inputText, waitForFocus, true);
 }
 
 function assertSearchTelemetryEmpty(search_hist) {
   const scalars = TelemetryTestUtils.getProcessScalars("parent", true, false);
-  Assert.equal(Object.keys(scalars).length, 0,
-    `Should not have recorded ${SCALAR_URLBAR}`);
+  Assert.ok(!(SCALAR_URLBAR in scalars), `Should not have recorded ${SCALAR_URLBAR}`);
 
   // Make sure SEARCH_COUNTS contains identical values.
   TelemetryTestUtils.assertKeyedHistogramSum(search_hist, "other-MozSearch.urlbar", undefined);
   TelemetryTestUtils.assertKeyedHistogramSum(search_hist, "other-MozSearch.alias", undefined);
 
   // Also check events.
   let events = Services.telemetry.snapshotEvents(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false);
   events = (events.parent || []).filter(e => e[1] == "navigation" && e[2] == "search");
-  Assert.equal(events.length, 0, "Should not have recorded any events");
+  Assert.deepEqual(events, [], "Should not have recorded any navigation search events");
 }
 
 function snapshotHistograms() {
   Services.telemetry.clearScalars();
   Services.telemetry.clearEvents();
   return {
     resultIndexHist: TelemetryTestUtils.getAndClearHistogram("FX_URLBAR_SELECTED_RESULT_INDEX"),
     resultTypeHist: TelemetryTestUtils.getAndClearHistogram("FX_URLBAR_SELECTED_RESULT_TYPE"),
--- a/browser/modules/test/browser/browser_UsageTelemetry_urlbar_remotetab.js
+++ b/browser/modules/test/browser/browser_UsageTelemetry_urlbar_remotetab.js
@@ -14,27 +14,26 @@ XPCOMUtils.defineLazyModuleGetters(this,
   SyncedTabs: "resource://services-sync/SyncedTabs.jsm",
   UrlbarTestUtils: "resource://testing-common/UrlbarTestUtils.jsm",
   URLBAR_SELECTED_RESULT_TYPES: "resource:///modules/BrowserUsageTelemetry.jsm",
   URLBAR_SELECTED_RESULT_METHODS: "resource:///modules/BrowserUsageTelemetry.jsm",
 });
 
 function assertSearchTelemetryEmpty(search_hist) {
   const scalars = TelemetryTestUtils.getProcessScalars("parent", true, false);
-  Assert.equal(Object.keys(scalars).length, 0,
-    `Should not have recorded ${SCALAR_URLBAR}`);
+  Assert.ok(!(SCALAR_URLBAR in scalars), `Should not have recorded ${SCALAR_URLBAR}`);
 
   // Make sure SEARCH_COUNTS contains identical values.
   TelemetryTestUtils.assertKeyedHistogramSum(search_hist, "other-MozSearch.urlbar", undefined);
   TelemetryTestUtils.assertKeyedHistogramSum(search_hist, "other-MozSearch.alias", undefined);
 
   // Also check events.
   let events = Services.telemetry.snapshotEvents(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false);
   events = (events.parent || []).filter(e => e[1] == "navigation" && e[2] == "search");
-  Assert.equal(events.length, 0, "Should not have recorded any events");
+  Assert.deepEqual(events, [], "Should not have recorded any navigation search events");
 }
 
 function snapshotHistograms() {
   Services.telemetry.clearScalars();
   Services.telemetry.clearEvents();
   return {
     resultIndexHist: TelemetryTestUtils.getAndClearHistogram("FX_URLBAR_SELECTED_RESULT_INDEX"),
     resultTypeHist: TelemetryTestUtils.getAndClearHistogram("FX_URLBAR_SELECTED_RESULT_TYPE"),