diff --git a/browser/modules/test/browser/browser_UsageTelemetry_content.js b/browser/modules/test/browser/browser_UsageTelemetry_content.js index 4af290a5133f..845040ab632c 100644 --- a/browser/modules/test/browser/browser_UsageTelemetry_content.js +++ b/browser/modules/test/browser/browser_UsageTelemetry_content.js @@ -81,7 +81,7 @@ add_task(async function test_context_menu() { // Also check events. let events = Services.telemetry.snapshotBuiltinEvents(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false); - events = (events.default || []).filter(e => e[1] == "navigation" && e[2] == "search"); + events = (events.parent || []).filter(e => e[1] == "navigation" && e[2] == "search"); checkEvents(events, [["navigation", "search", "contextmenu", null, {engine: "other-MozSearch"}]]); contextMenu.hidePopup(); @@ -117,7 +117,7 @@ add_task(async function test_about_newtab() { // Also check events. let events = Services.telemetry.snapshotBuiltinEvents(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false); - events = (events.default || []).filter(e => e[1] == "navigation" && e[2] == "search"); + events = (events.parent || []).filter(e => e[1] == "navigation" && e[2] == "search"); checkEvents(events, [["navigation", "search", "about_newtab", "enter", {engine: "other-MozSearch"}]]); await BrowserTestUtils.removeTab(tab); diff --git a/browser/modules/test/browser/browser_UsageTelemetry_content_aboutHome.js b/browser/modules/test/browser/browser_UsageTelemetry_content_aboutHome.js index 1320c7144684..eef3b6f5078c 100644 --- a/browser/modules/test/browser/browser_UsageTelemetry_content_aboutHome.js +++ b/browser/modules/test/browser/browser_UsageTelemetry_content_aboutHome.js @@ -81,7 +81,7 @@ add_task(async function test_abouthome_simpleQuery() { // Also check events. let events = Services.telemetry.snapshotBuiltinEvents(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false); - events = (events.default || []).filter(e => e[1] == "navigation" && e[2] == "search"); + events = (events.parent || []).filter(e => e[1] == "navigation" && e[2] == "search"); checkEvents(events, [["navigation", "search", "about_home", "enter", {engine: "other-MozSearch"}]]); await BrowserTestUtils.removeTab(tab); diff --git a/browser/modules/test/browser/browser_UsageTelemetry_searchbar.js b/browser/modules/test/browser/browser_UsageTelemetry_searchbar.js index ff88f7fe1565..2f79c96f16b6 100644 --- a/browser/modules/test/browser/browser_UsageTelemetry_searchbar.js +++ b/browser/modules/test/browser/browser_UsageTelemetry_searchbar.js @@ -129,7 +129,7 @@ add_task(async function test_plainQuery() { // Also check events. let events = Services.telemetry.snapshotBuiltinEvents(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false); - events = (events.default || []).filter(e => e[1] == "navigation" && e[2] == "search"); + events = (events.parent || []).filter(e => e[1] == "navigation" && e[2] == "search"); checkEvents(events, [["navigation", "search", "searchbar", "enter", {engine: "other-MozSearch"}]]); // Check the histograms as well. @@ -173,7 +173,7 @@ add_task(async function test_oneOff_enter() { // Also check events. let events = Services.telemetry.snapshotBuiltinEvents(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false); - events = (events.default || []).filter(e => e[1] == "navigation" && e[2] == "search"); + events = (events.parent || []).filter(e => e[1] == "navigation" && e[2] == "search"); checkEvents(events, [["navigation", "search", "searchbar", "oneoff", {engine: "other-MozSearch2"}]]); // Check the histograms as well. @@ -298,7 +298,7 @@ add_task(async function test_suggestion_click() { // Also check events. let events = Services.telemetry.snapshotBuiltinEvents(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false); - events = (events.default || []).filter(e => e[1] == "navigation" && e[2] == "search"); + events = (events.parent || []).filter(e => e[1] == "navigation" && e[2] == "search"); checkEvents(events, [["navigation", "search", "searchbar", "suggestion", {engine: searchEngineId}]]); // Check the histograms as well. diff --git a/browser/modules/test/browser/browser_UsageTelemetry_urlbar.js b/browser/modules/test/browser/browser_UsageTelemetry_urlbar.js index df93864f9bbb..20b70c978c4b 100644 --- a/browser/modules/test/browser/browser_UsageTelemetry_urlbar.js +++ b/browser/modules/test/browser/browser_UsageTelemetry_urlbar.js @@ -138,7 +138,7 @@ add_task(async function test_simpleQuery() { // Also check events. let events = Services.telemetry.snapshotBuiltinEvents(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false); - events = (events.default || []).filter(e => e[1] == "navigation" && e[2] == "search"); + events = (events.parent || []).filter(e => e[1] == "navigation" && e[2] == "search"); checkEvents(events, [["navigation", "search", "urlbar", "enter", {engine: "other-MozSearch"}]]); // Check the histograms as well. @@ -197,7 +197,7 @@ add_task(async function test_searchAlias() { // Also check events. let events = Services.telemetry.snapshotBuiltinEvents(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false); - events = (events.default || []).filter(e => e[1] == "navigation" && e[2] == "search"); + events = (events.parent || []).filter(e => e[1] == "navigation" && e[2] == "search"); checkEvents(events, [["navigation", "search", "urlbar", "alias", {engine: "other-MozSearch"}]]); // Check the histograms as well. @@ -261,7 +261,7 @@ add_task(async function test_oneOff_enter() { // Also check events. let events = Services.telemetry.snapshotBuiltinEvents(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false); - events = (events.default || []).filter(e => e[1] == "navigation" && e[2] == "search"); + events = (events.parent || []).filter(e => e[1] == "navigation" && e[2] == "search"); checkEvents(events, [["navigation", "search", "urlbar", "oneoff", {engine: "other-MozSearch"}]]); // Check the histograms as well. @@ -408,7 +408,7 @@ add_task(async function test_suggestion_click() { // Also check events. let events = Services.telemetry.snapshotBuiltinEvents(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false); - events = (events.default || []).filter(e => e[1] == "navigation" && e[2] == "search"); + events = (events.parent || []).filter(e => e[1] == "navigation" && e[2] == "search"); checkEvents(events, [["navigation", "search", "urlbar", "suggestion", {engine: searchEngineId}]]); // Check the histograms as well. diff --git a/browser/modules/test/browser/head.js b/browser/modules/test/browser/head.js index 594584b5180b..4080d79b5dbd 100644 --- a/browser/modules/test/browser/head.js +++ b/browser/modules/test/browser/head.js @@ -100,8 +100,8 @@ function checkKeyedHistogram(h, key, expectedValue) { */ function getParentProcessScalars(aChannel, aKeyed = false, aClear = false) { const scalars = aKeyed ? - Services.telemetry.snapshotKeyedScalars(aChannel, aClear)["default"] : - Services.telemetry.snapshotScalars(aChannel, aClear)["default"]; + Services.telemetry.snapshotKeyedScalars(aChannel, aClear)["parent"] : + Services.telemetry.snapshotScalars(aChannel, aClear)["parent"]; return scalars || {}; }