summaryrefslogtreecommitdiffstats
path: root/browser/components/search/test
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/search/test')
-rw-r--r--browser/components/search/test/browser/telemetry/browser.toml6
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_glean_serp_event_telemetry_categorization_enabled_by_nimbus_variable.js2
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_glean_serp_event_telemetry_enabled_by_nimbus_variable.js167
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_abandonment.js9
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_adImpression_component.js14
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_adImpression_component_skipCount_children.js1
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_adImpression_component_skipCount_parent.js1
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_categorization_timing.js3
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_ad_values.js6
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_download_timer.js2
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_no_sponsored_values.js11
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_region.js2
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_reporting.js6
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_reporting_timer.js8
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_reporting_timer_wakeup.js4
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_cached.js5
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_cached_serp.js3
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_content.js16
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_eventListeners_children.js1
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_eventListeners_parent.js1
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_ignoreLinkRegexps.js1
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_multiple_tabs.js5
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_nonAdsLinkQueryParamNames.js5
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_non_ad.js6
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_query_params.js10
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_redirect.js10
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_target.js14
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_new_window.js9
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_private.js7
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_remote_settings_sync.js5
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_shopping.js5
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_signed_in_to_account.js187
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_sources.js2
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_about.js3
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_ads.js12
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_ads_clicks.js11
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_ads_data_attributes.js9
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_ads_load_events.js5
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_in_content.js15
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_navigation.js21
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_webextension.js3
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_spa_in_content.js13
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_spa_multi_provider.js16
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_spa_multi_tab.js27
-rw-r--r--browser/components/search/test/browser/telemetry/browser_search_telemetry_spa_single_tab.js18
-rw-r--r--browser/components/search/test/marionette/telemetry/test_ping_submitted.py2
-rw-r--r--browser/components/search/test/unit/test_ui_schemas_valid.js4
-rw-r--r--browser/components/search/test/unit/test_urlTelemetry_generic.js32
48 files changed, 460 insertions, 265 deletions
diff --git a/browser/components/search/test/browser/telemetry/browser.toml b/browser/components/search/test/browser/telemetry/browser.toml
index 5e42a9187d..c8cb201324 100644
--- a/browser/components/search/test/browser/telemetry/browser.toml
+++ b/browser/components/search/test/browser/telemetry/browser.toml
@@ -6,9 +6,6 @@ prefs = ["browser.search.log=true"]
["browser_search_glean_serp_event_telemetry_categorization_enabled_by_nimbus_variable.js"]
support-files = ["searchTelemetryDomainCategorizationReporting.html"]
-["browser_search_glean_serp_event_telemetry_enabled_by_nimbus_variable.js"]
-support-files = ["searchTelemetryAd.html"]
-
["browser_search_telemetry_abandonment.js"]
support-files = [
"searchTelemetry.html",
@@ -175,6 +172,9 @@ support-files = [
["browser_search_telemetry_shopping.js"]
support-files = ["searchTelemetryAd_shopping.html"]
+["browser_search_telemetry_signed_in_to_account.js"]
+support-files = ["searchTelemetry.html"]
+
["browser_search_telemetry_sources.js"]
support-files = ["searchTelemetry.html", "searchTelemetryAd.html"]
diff --git a/browser/components/search/test/browser/telemetry/browser_search_glean_serp_event_telemetry_categorization_enabled_by_nimbus_variable.js b/browser/components/search/test/browser/telemetry/browser_search_glean_serp_event_telemetry_categorization_enabled_by_nimbus_variable.js
index 8e9db64fae..d6ff3e2ed9 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_glean_serp_event_telemetry_categorization_enabled_by_nimbus_variable.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_glean_serp_event_telemetry_categorization_enabled_by_nimbus_variable.js
@@ -162,6 +162,8 @@ add_task(async function test_enable_experiment_when_pref_is_not_enabled() {
tagged: "true",
is_shopping_page: "false",
num_ads_clicked: "0",
+ num_ads_hidden: "0",
+ num_ads_loaded: "2",
num_ads_visible: "2",
},
]);
diff --git a/browser/components/search/test/browser/telemetry/browser_search_glean_serp_event_telemetry_enabled_by_nimbus_variable.js b/browser/components/search/test/browser/telemetry/browser_search_glean_serp_event_telemetry_enabled_by_nimbus_variable.js
deleted file mode 100644
index 096178499b..0000000000
--- a/browser/components/search/test/browser/telemetry/browser_search_glean_serp_event_telemetry_enabled_by_nimbus_variable.js
+++ /dev/null
@@ -1,167 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Test to verify we can toggle the Glean SERP event telemetry feature via a
-// Nimbus variable.
-
-const lazy = {};
-
-const TELEMETRY_PREF = "browser.search.serpEventTelemetry.enabled";
-
-ChromeUtils.defineESModuleGetters(lazy, {
- ExperimentAPI: "resource://nimbus/ExperimentAPI.sys.mjs",
- ExperimentFakes: "resource://testing-common/NimbusTestUtils.sys.mjs",
-});
-
-XPCOMUtils.defineLazyPreferenceGetter(
- lazy,
- "serpEventsEnabled",
- TELEMETRY_PREF,
- false
-);
-
-const TEST_PROVIDER_INFO = [
- {
- telemetryId: "example",
- searchPageRegexp:
- /^https:\/\/example.org\/browser\/browser\/components\/search\/test\/browser\/telemetry\/searchTelemetry(?:Ad)?.html/,
- queryParamNames: ["s"],
- codeParamName: "abc",
- taggedCodes: ["ff"],
- followOnParamNames: ["a"],
- extraAdServersRegexps: [/^https:\/\/example\.com\/ad2?/],
- components: [
- {
- type: SearchSERPTelemetryUtils.COMPONENTS.AD_LINK,
- default: true,
- },
- ],
- },
-];
-
-async function verifyEventsRecorded() {
- resetTelemetry();
-
- let tab = await BrowserTestUtils.openNewForegroundTab(
- gBrowser,
- getSERPUrl("searchTelemetryAd.html")
- );
- await waitForPageWithAdImpressions();
-
- assertSERPTelemetry([
- {
- impression: {
- provider: "example",
- tagged: "true",
- partner_code: "ff",
- source: "unknown",
- is_shopping_page: "false",
- is_private: "false",
- shopping_tab_displayed: "false",
- },
- adImpressions: [
- {
- component: SearchSERPTelemetryUtils.COMPONENTS.AD_LINK,
- ads_loaded: "2",
- ads_visible: "2",
- ads_hidden: "0",
- },
- ],
- },
- ]);
-
- BrowserTestUtils.removeTab(tab);
-
- assertSERPTelemetry([
- {
- impression: {
- provider: "example",
- tagged: "true",
- partner_code: "ff",
- source: "unknown",
- is_shopping_page: "false",
- is_private: "false",
- shopping_tab_displayed: "false",
- },
- adImpressions: [
- {
- component: SearchSERPTelemetryUtils.COMPONENTS.AD_LINK,
- ads_loaded: "2",
- ads_visible: "2",
- ads_hidden: "0",
- },
- ],
- abandonment: {
- reason: SearchSERPTelemetryUtils.ABANDONMENTS.TAB_CLOSE,
- },
- },
- ]);
-}
-
-add_setup(async function () {
- SearchSERPTelemetry.overrideSearchTelemetryForTests(TEST_PROVIDER_INFO);
- await waitForIdle();
-
- // Enable local telemetry recording for the duration of the tests.
- let oldCanRecord = Services.telemetry.canRecordExtended;
- Services.telemetry.canRecordExtended = true;
-
- registerCleanupFunction(async () => {
- SearchSERPTelemetry.overrideSearchTelemetryForTests();
- Services.telemetry.canRecordExtended = oldCanRecord;
- await SpecialPowers.popPrefEnv();
- resetTelemetry();
- });
-});
-
-add_task(async function test_enable_experiment_when_pref_is_not_enabled() {
- let prefBranch = Services.prefs.getDefaultBranch("");
- let originalPrefValue = prefBranch.getBoolPref(TELEMETRY_PREF);
-
- // Ensure the build being tested has the preference value as false.
- // Changing the preference in the test must be done on the default branch
- // because in the telemetry code, we're referencing the preference directly
- // instead of through NimbusFeatures. Enrolling in an experiment will change
- // the default branch, and not overwrite the user branch.
- prefBranch.setBoolPref(TELEMETRY_PREF, false);
-
- Assert.equal(
- lazy.serpEventsEnabled,
- false,
- "serpEventsEnabled should be false when not enrolled in experiment."
- );
-
- await lazy.ExperimentAPI.ready();
-
- let doExperimentCleanup = await lazy.ExperimentFakes.enrollWithFeatureConfig(
- {
- featureId: NimbusFeatures.search.featureId,
- value: {
- serpEventTelemetryEnabled: true,
- },
- },
- { isRollout: true }
- );
-
- Assert.equal(
- lazy.serpEventsEnabled,
- true,
- "serpEventsEnabled should be true when enrolled in experiment."
- );
-
- // To ensure Nimbus set "browser.search.serpEventTelemetry.enabled" to true,
- // we test that an impression, ad_impression and abandonment event are
- // recorded correctly.
- await verifyEventsRecorded();
-
- await doExperimentCleanup();
-
- Assert.equal(
- lazy.serpEventsEnabled,
- false,
- "serpEventsEnabled should be false after experiment."
- );
-
- // Clean up.
- prefBranch.setBoolPref(TELEMETRY_PREF, originalPrefValue);
-});
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_abandonment.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_abandonment.js
index 0c1d8b8234..799c5018e9 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_abandonment.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_abandonment.js
@@ -2,7 +2,7 @@
* http://creativecommons.org/publicdomain/zero/1.0/ */
/*
- * Tests for the Glean SERP abandonment event
+ * Tests for the Glean SERP abandonment event.
*/
"use strict";
@@ -32,9 +32,6 @@ add_setup(async function () {
// Enable local telemetry recording for the duration of the tests.
let oldCanRecord = Services.telemetry.canRecordExtended;
Services.telemetry.canRecordExtended = true;
- await SpecialPowers.pushPrefEnv({
- set: [["browser.search.serpEventTelemetry.enabled", true]],
- });
registerCleanupFunction(async () => {
SearchSERPTelemetry.overrideSearchTelemetryForTests();
@@ -65,6 +62,7 @@ add_task(async function test_tab_close() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
abandonment: {
reason: SearchSERPTelemetryUtils.ABANDONMENTS.TAB_CLOSE,
@@ -99,6 +97,7 @@ add_task(async function test_window_close() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
abandonment: {
reason: SearchSERPTelemetryUtils.ABANDONMENTS.WINDOW_CLOSE,
@@ -134,6 +133,7 @@ add_task(async function test_navigation_via_urlbar() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
abandonment: {
reason: SearchSERPTelemetryUtils.ABANDONMENTS.NAVIGATION,
@@ -181,6 +181,7 @@ add_task(async function test_navigation_via_back_button() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
abandonment: {
reason: SearchSERPTelemetryUtils.ABANDONMENTS.NAVIGATION,
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_adImpression_component.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_adImpression_component.js
index 5a09353ed6..dd7629f5f3 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_adImpression_component.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_adImpression_component.js
@@ -103,9 +103,6 @@ add_setup(async function () {
// Enable local telemetry recording for the duration of the tests.
let oldCanRecord = Services.telemetry.canRecordExtended;
Services.telemetry.canRecordExtended = true;
- await SpecialPowers.pushPrefEnv({
- set: [["browser.search.serpEventTelemetry.enabled", true]],
- });
// The tests evaluate whether or not ads are visible depending on whether
// they are within the view of the window. To ensure the test results
@@ -142,6 +139,7 @@ add_task(async function test_ad_impressions_with_one_carousel() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -186,6 +184,7 @@ add_task(async function test_ad_impressions_with_two_carousels() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -221,6 +220,7 @@ add_task(
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -272,6 +272,7 @@ add_task(async function test_ad_impressions_with_carousels_tabhistory() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -304,6 +305,7 @@ add_task(async function test_ad_impressions_with_hidden_carousels() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -338,6 +340,7 @@ add_task(async function test_ad_impressions_with_carousel_scrolled_left() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -372,6 +375,7 @@ add_task(async function test_ad_impressions_with_carousel_below_the_fold() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -404,6 +408,7 @@ add_task(async function test_ad_impressions_with_text_links() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -463,6 +468,7 @@ add_task(async function test_ad_visibility() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -495,6 +501,7 @@ add_task(async function test_impressions_without_ads() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -527,6 +534,7 @@ add_task(async function test_ad_impressions_with_cookie_banner() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_adImpression_component_skipCount_children.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_adImpression_component_skipCount_children.js
index 65cd612a49..6f4f5d7ec1 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_adImpression_component_skipCount_children.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_adImpression_component_skipCount_children.js
@@ -28,6 +28,7 @@ const IMPRESSION = {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
};
const SERP_URL = getSERPUrl("searchTelemetryAd_searchbox_with_content.html");
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_adImpression_component_skipCount_parent.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_adImpression_component_skipCount_parent.js
index 8471215840..e6e5f04cf9 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_adImpression_component_skipCount_parent.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_adImpression_component_skipCount_parent.js
@@ -28,6 +28,7 @@ const IMPRESSION = {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
};
const SERP_URL = getSERPUrl("searchTelemetryAd_searchbox_with_content.html");
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_categorization_timing.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_categorization_timing.js
index 9ecc4e8d92..a43fae7ca2 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_categorization_timing.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_categorization_timing.js
@@ -30,9 +30,6 @@ const TEST_PROVIDER_INFO = [
add_setup(async function () {
SearchSERPTelemetry.overrideSearchTelemetryForTests(TEST_PROVIDER_INFO);
await waitForIdle();
- await SpecialPowers.pushPrefEnv({
- set: [["browser.search.serpEventTelemetry.enabled", true]],
- });
registerCleanupFunction(async () => {
SearchSERPTelemetry.overrideSearchTelemetryForTests();
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_ad_values.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_ad_values.js
index daccbf0c93..a9201beb22 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_ad_values.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_ad_values.js
@@ -115,6 +115,8 @@ add_task(async function test_load_serp_and_categorize() {
tagged: "true",
is_shopping_page: "false",
num_ads_clicked: "0",
+ num_ads_hidden: "0",
+ num_ads_loaded: "2",
num_ads_visible: "2",
},
]);
@@ -156,6 +158,8 @@ add_task(async function test_load_serp_and_categorize_and_click_organic() {
tagged: "true",
is_shopping_page: "false",
num_ads_clicked: "0",
+ num_ads_hidden: "0",
+ num_ads_loaded: "2",
num_ads_visible: "2",
},
]);
@@ -195,6 +199,8 @@ add_task(async function test_load_serp_and_categorize_and_click_sponsored() {
tagged: "true",
is_shopping_page: "false",
num_ads_clicked: "1",
+ num_ads_hidden: "0",
+ num_ads_loaded: "2",
num_ads_visible: "2",
},
]);
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_download_timer.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_download_timer.js
index 9bd215f697..694900912d 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_download_timer.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_download_timer.js
@@ -179,6 +179,8 @@ add_task(async function test_download_after_failure() {
provider: "example",
tagged: "true",
is_shopping_page: "false",
+ num_ads_hidden: "0",
+ num_ads_loaded: "2",
num_ads_visible: "2",
num_ads_clicked: "0",
},
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_no_sponsored_values.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_no_sponsored_values.js
index 2375cad82a..f23859dbd5 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_no_sponsored_values.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_no_sponsored_values.js
@@ -87,13 +87,14 @@ add_task(
assertSERPTelemetry([
{
impression: {
- shopping_tab_displayed: "true",
provider: "example",
- source: "unknown",
tagged: "true",
- is_private: "false",
- is_shopping_page: "false",
partner_code: "ff",
+ source: "unknown",
+ is_shopping_page: "false",
+ is_private: "false",
+ shopping_tab_displayed: "true",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -134,6 +135,8 @@ add_task(
tagged: "true",
is_shopping_page: "false",
num_ads_clicked: "0",
+ num_ads_hidden: "0",
+ num_ads_loaded: "0",
num_ads_visible: "0",
},
]);
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_region.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_region.js
index 7dbf605396..45d97c85e8 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_region.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_region.js
@@ -126,6 +126,8 @@ add_task(async function test_categorize_page_with_different_region() {
tagged: "true",
is_shopping_page: "false",
num_ads_clicked: "0",
+ num_ads_hidden: "0",
+ num_ads_loaded: "2",
num_ads_visible: "2",
},
]);
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_reporting.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_reporting.js
index 3c439844d7..fba30ec4a0 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_reporting.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_reporting.js
@@ -136,6 +136,8 @@ add_task(async function test_categorization_reporting() {
tagged: "true",
is_shopping_page: "false",
num_ads_clicked: "0",
+ num_ads_hidden: "0",
+ num_ads_loaded: "2",
num_ads_visible: "2",
},
]);
@@ -242,6 +244,8 @@ add_task(async function test_reporting_limited_to_10_domains_of_each_kind() {
tagged: "true",
is_shopping_page: "false",
num_ads_clicked: "0",
+ num_ads_hidden: "0",
+ num_ads_loaded: "12",
num_ads_visible: "12",
},
]);
@@ -279,6 +283,8 @@ add_task(async function test_categorization_reporting_for_shopping_page() {
tagged: "true",
is_shopping_page: "true",
num_ads_clicked: "0",
+ num_ads_hidden: "0",
+ num_ads_loaded: "2",
num_ads_visible: "2",
},
]);
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_reporting_timer.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_reporting_timer.js
index 0e2d1c07fd..59a3c15ef9 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_reporting_timer.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_reporting_timer.js
@@ -139,6 +139,8 @@ add_task(async function test_categorize_serp_and_wait() {
tagged: "true",
is_shopping_page: "false",
num_ads_clicked: "0",
+ num_ads_hidden: "0",
+ num_ads_loaded: "2",
num_ads_visible: "2",
},
]);
@@ -184,6 +186,8 @@ add_task(async function test_categorize_serp_open_multiple_tabs() {
tagged: "true",
is_shopping_page: "false",
num_ads_clicked: "0",
+ num_ads_hidden: "0",
+ num_ads_loaded: "2",
num_ads_visible: "2",
});
}
@@ -238,6 +242,8 @@ add_task(async function test_categorize_serp_close_tab_and_wait() {
tagged: "true",
is_shopping_page: "false",
num_ads_clicked: "0",
+ num_ads_hidden: "0",
+ num_ads_loaded: "2",
num_ads_visible: "2",
},
]);
@@ -292,6 +298,8 @@ add_task(async function test_categorize_serp_open_ad_and_wait() {
tagged: "true",
is_shopping_page: "false",
num_ads_clicked: "1",
+ num_ads_hidden: "0",
+ num_ads_loaded: "2",
num_ads_visible: "2",
},
]);
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_reporting_timer_wakeup.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_reporting_timer_wakeup.js
index 43c520a8d0..b824ec9817 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_reporting_timer_wakeup.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_domain_categorization_reporting_timer_wakeup.js
@@ -151,6 +151,8 @@ add_task(async function test_categorize_serp_and_sleep() {
tagged: "true",
is_shopping_page: "false",
num_ads_clicked: "0",
+ num_ads_hidden: "0",
+ num_ads_loaded: "2",
num_ads_visible: "2",
},
]);
@@ -209,6 +211,8 @@ add_task(async function test_categorize_serp_and_sleep_not_long_enough() {
tagged: "true",
is_shopping_page: "false",
num_ads_clicked: "0",
+ num_ads_hidden: "0",
+ num_ads_loaded: "2",
num_ads_visible: "2",
},
]);
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_cached.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_cached.js
index 791e29a01f..7392c15396 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_cached.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_cached.js
@@ -89,9 +89,6 @@ add_setup(async function () {
// Enable local telemetry recording for the duration of the tests.
let oldCanRecord = Services.telemetry.canRecordExtended;
Services.telemetry.canRecordExtended = true;
- await SpecialPowers.pushPrefEnv({
- set: [["browser.search.serpEventTelemetry.enabled", true]],
- });
registerCleanupFunction(async () => {
SearchSERPTelemetry.overrideSearchTelemetryForTests();
@@ -142,6 +139,7 @@ add_task(async function test_click_cached_page() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -173,6 +171,7 @@ add_task(async function test_click_cached_page() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_cached_serp.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_cached_serp.js
index 72e26639fb..13861f4b27 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_cached_serp.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_cached_serp.js
@@ -48,9 +48,6 @@ const TEST_PROVIDER_INFO = [
add_setup(async function () {
SearchSERPTelemetry.overrideSearchTelemetryForTests(TEST_PROVIDER_INFO);
await waitForIdle();
- await SpecialPowers.pushPrefEnv({
- set: [["browser.search.serpEventTelemetry.enabled", true]],
- });
registerCleanupFunction(async () => {
SearchSERPTelemetry.overrideSearchTelemetryForTests();
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_content.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_content.js
index f94e6b0bd8..993568abe6 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_content.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_content.js
@@ -75,9 +75,6 @@ add_setup(async function () {
// Enable local telemetry recording for the duration of the tests.
let oldCanRecord = Services.telemetry.canRecordExtended;
Services.telemetry.canRecordExtended = true;
- await SpecialPowers.pushPrefEnv({
- set: [["browser.search.serpEventTelemetry.enabled", true]],
- });
registerCleanupFunction(async () => {
SearchSERPTelemetry.overrideSearchTelemetryForTests();
@@ -113,6 +110,7 @@ add_task(async function test_click_tab() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "true",
+ is_signed_in: "false",
},
engagements: [
{
@@ -144,6 +142,7 @@ add_task(async function test_click_tab() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "true",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -192,6 +191,7 @@ add_task(async function test_click_shopping() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "true",
+ is_signed_in: "false",
},
engagements: [
{
@@ -223,6 +223,7 @@ add_task(async function test_click_shopping() {
is_shopping_page: "true",
is_private: "false",
shopping_tab_displayed: "true",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -275,6 +276,7 @@ add_task(async function test_click_related_search_in_new_tab() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "true",
+ is_signed_in: "false",
},
engagements: [
{
@@ -306,6 +308,7 @@ add_task(async function test_click_related_search_in_new_tab() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "true",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -361,6 +364,7 @@ add_task(async function test_click_redirect_search_in_newtab() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "true",
+ is_signed_in: "false",
},
engagements: [
{
@@ -392,6 +396,7 @@ add_task(async function test_click_redirect_search_in_newtab() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "true",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -454,6 +459,7 @@ add_task(async function test_content_source_reset() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "true",
+ is_signed_in: "false",
},
engagements: [
{
@@ -489,6 +495,7 @@ add_task(async function test_content_source_reset() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "true",
+ is_signed_in: "false",
},
engagements: [
{
@@ -520,6 +527,7 @@ add_task(async function test_content_source_reset() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "true",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -580,6 +588,7 @@ add_task(async function test_click_refinement_button() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "true",
+ is_signed_in: "false",
},
engagements: [
{
@@ -611,6 +620,7 @@ add_task(async function test_click_refinement_button() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "true",
+ is_signed_in: "false",
},
adImpressions: [
{
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_eventListeners_children.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_eventListeners_children.js
index 4f5aaf9378..dce34e9443 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_eventListeners_children.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_eventListeners_children.js
@@ -28,6 +28,7 @@ const IMPRESSION = {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
};
const SELECTOR = ".arrow";
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_eventListeners_parent.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_eventListeners_parent.js
index 4e3c635b4c..6d509ba904 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_eventListeners_parent.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_eventListeners_parent.js
@@ -29,6 +29,7 @@ const IMPRESSION = {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
};
const SELECTOR = ".arrow";
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_ignoreLinkRegexps.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_ignoreLinkRegexps.js
index 10f2a2d836..86e9779d0b 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_ignoreLinkRegexps.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_ignoreLinkRegexps.js
@@ -49,6 +49,7 @@ const IMPRESSION = {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
};
const SERP_URL = getSERPUrl("searchTelemetryAd_searchbox_with_content.html");
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_multiple_tabs.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_multiple_tabs.js
index fbe6f4fc73..0e76c0c8a1 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_multiple_tabs.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_multiple_tabs.js
@@ -63,10 +63,7 @@ add_setup(async function () {
SearchSERPTelemetry.overrideSearchTelemetryForTests(TEST_PROVIDER_INFO);
await waitForIdle();
await SpecialPowers.pushPrefEnv({
- set: [
- ["browser.search.serpEventTelemetry.enabled", true],
- ["dom.ipc.processCount.webIsolated", MAX_IPC],
- ],
+ set: [["dom.ipc.processCount.webIsolated", MAX_IPC]],
});
registerCleanupFunction(async () => {
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_nonAdsLinkQueryParamNames.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_nonAdsLinkQueryParamNames.js
index 93a6b7993e..b334aa5637 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_nonAdsLinkQueryParamNames.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_nonAdsLinkQueryParamNames.js
@@ -76,6 +76,7 @@ add_task(async function test_click_absolute_url_in_query_param() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "true",
+ is_signed_in: "false",
},
engagements: [
{
@@ -101,6 +102,7 @@ add_task(async function test_click_absolute_url_in_query_param() {
is_shopping_page: "true",
is_private: "false",
shopping_tab_displayed: "true",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -151,6 +153,7 @@ add_task(async function test_click_relative_href_in_query_param() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "true",
+ is_signed_in: "false",
},
engagements: [
{
@@ -176,6 +179,7 @@ add_task(async function test_click_relative_href_in_query_param() {
is_shopping_page: "true",
is_private: "false",
shopping_tab_displayed: "true",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -226,6 +230,7 @@ add_task(async function test_click_irrelevant_href_in_query_param() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "true",
+ is_signed_in: "false",
},
engagements: [
{
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_non_ad.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_non_ad.js
index d351234d50..94e8ab24fe 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_non_ad.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_non_ad.js
@@ -31,10 +31,6 @@ const TEST_PROVIDER_INFO = [
add_setup(async function () {
SearchSERPTelemetry.overrideSearchTelemetryForTests(TEST_PROVIDER_INFO);
await waitForIdle();
- // Enable local telemetry recording for the duration of the tests.
- await SpecialPowers.pushPrefEnv({
- set: [["browser.search.serpEventTelemetry.enabled", true]],
- });
registerCleanupFunction(async () => {
SearchSERPTelemetry.overrideSearchTelemetryForTests();
@@ -71,6 +67,7 @@ add_task(async function test_click_non_ads_link() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -128,6 +125,7 @@ add_task(async function test_click_non_ad_with_no_ads() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_query_params.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_query_params.js
index 6d93707d68..da8c952191 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_query_params.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_query_params.js
@@ -5,7 +5,6 @@
* These tests load SERPs and check that query params that are changed either
* by the browser or in the page after click are still properly recognized
* as ads.
- *
*/
"use strict";
@@ -50,9 +49,6 @@ add_setup(async function () {
// Enable local telemetry recording for the duration of the tests.
let oldCanRecord = Services.telemetry.canRecordExtended;
Services.telemetry.canRecordExtended = true;
- await SpecialPowers.pushPrefEnv({
- set: [["browser.search.serpEventTelemetry.enabled", true]],
- });
registerCleanupFunction(async () => {
SearchSERPTelemetry.overrideSearchTelemetryForTests();
@@ -88,6 +84,7 @@ add_task(async function test_click_links() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -136,6 +133,7 @@ add_task(async function test_click_links() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -167,6 +165,7 @@ add_task(async function test_click_links() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -231,6 +230,7 @@ add_task(async function test_click_link_with_more_parameters() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -294,6 +294,7 @@ add_task(async function test_click_link_with_fewer_parameters() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -357,6 +358,7 @@ add_task(async function test_click_link_with_reordered_parameters() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_redirect.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_redirect.js
index 5d7f2ee408..7851cbb7e7 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_redirect.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_redirect.js
@@ -36,10 +36,6 @@ const TEST_PROVIDER_INFO = [
add_setup(async function () {
SearchSERPTelemetry.overrideSearchTelemetryForTests(TEST_PROVIDER_INFO);
await waitForIdle();
- // Enable local telemetry recording for the duration of the tests.
- await SpecialPowers.pushPrefEnv({
- set: [["browser.search.serpEventTelemetry.enabled", true]],
- });
registerCleanupFunction(async () => {
SearchSERPTelemetry.overrideSearchTelemetryForTests();
@@ -79,6 +75,7 @@ add_task(async function test_click_non_ads_link_redirected() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -139,6 +136,7 @@ add_task(async function test_click_non_ads_link_redirected_new_tab() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -195,6 +193,7 @@ add_task(async function test_click_non_ads_link_redirect_non_top_level() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -248,6 +247,7 @@ add_task(async function test_multiple_redirects_non_ad_link() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -301,6 +301,7 @@ add_task(async function test_click_ad_link_redirected() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -349,6 +350,7 @@ add_task(async function test_click_ad_link_redirected_new_tab() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_target.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_target.js
index 8f7f7f4e05..5af024222c 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_target.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_engagement_target.js
@@ -148,9 +148,6 @@ add_setup(async function () {
// Enable local telemetry recording for the duration of the tests.
let oldCanRecord = Services.telemetry.canRecordExtended;
Services.telemetry.canRecordExtended = true;
- await SpecialPowers.pushPrefEnv({
- set: [["browser.search.serpEventTelemetry.enabled", true]],
- });
registerCleanupFunction(async () => {
SearchSERPTelemetry.overrideSearchTelemetryForTests();
@@ -189,6 +186,7 @@ add_task(async function test_click_second_ad_in_component() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -245,6 +243,7 @@ add_task(async function test_click_ads_link_modified() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -300,6 +299,7 @@ add_task(async function test_click_and_submit_incontent_searchbox() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -321,6 +321,7 @@ add_task(async function test_click_and_submit_incontent_searchbox() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
},
]);
@@ -358,6 +359,7 @@ add_task(async function test_click_autosuggest() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -375,6 +377,7 @@ add_task(async function test_click_autosuggest() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
},
]);
@@ -404,6 +407,7 @@ add_task(async function test_click_carousel_expand() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -464,6 +468,7 @@ add_task(async function test_click_link_with_special_characters_in_path() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -519,6 +524,7 @@ add_task(async function test_click_cookie_banner_accept() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -564,6 +570,7 @@ add_task(async function test_click_cookie_banner_reject() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -609,6 +616,7 @@ add_task(async function test_click_cookie_banner_more_options() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_new_window.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_new_window.js
index 4f943fe92d..8866f72579 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_new_window.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_new_window.js
@@ -30,10 +30,6 @@ const TEST_PROVIDER_INFO = [
add_setup(async function () {
SearchSERPTelemetry.overrideSearchTelemetryForTests(TEST_PROVIDER_INFO);
await waitForIdle();
- // Enable local telemetry recording for the duration of the tests.
- await SpecialPowers.pushPrefEnv({
- set: [["browser.search.serpEventTelemetry.enabled", true]],
- });
registerCleanupFunction(async () => {
SearchSERPTelemetry.overrideSearchTelemetryForTests();
@@ -83,6 +79,7 @@ add_task(async function load_serp_in_new_window_with_pref_and_click_ad() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -148,6 +145,7 @@ add_task(async function load_serp_in_new_window_with_pref_and_click_organic() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -214,6 +212,7 @@ add_task(async function load_serp_in_new_window_with_context_menu() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -303,6 +302,7 @@ add_task(
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -322,6 +322,7 @@ add_task(
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_private.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_private.js
index ea7556c8f6..2c4494e202 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_private.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_private.js
@@ -31,10 +31,6 @@ const TEST_PROVIDER_INFO = [
add_setup(async function () {
SearchSERPTelemetry.overrideSearchTelemetryForTests(TEST_PROVIDER_INFO);
await waitForIdle();
- // Enable local telemetry recording for the duration of the tests.
- await SpecialPowers.pushPrefEnv({
- set: [["browser.search.serpEventTelemetry.enabled", true]],
- });
registerCleanupFunction(async () => {
SearchSERPTelemetry.overrideSearchTelemetryForTests();
@@ -82,6 +78,7 @@ add_task(async function load_2_pbm_serps_and_1_non_pbm_serp() {
is_shopping_page: "false",
is_private: "true",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
abandonment: {
reason: SearchSERPTelemetryUtils.ABANDONMENTS.NAVIGATION,
@@ -96,6 +93,7 @@ add_task(async function load_2_pbm_serps_and_1_non_pbm_serp() {
is_shopping_page: "false",
is_private: "true",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
abandonment: {
reason: SearchSERPTelemetryUtils.ABANDONMENTS.TAB_CLOSE,
@@ -118,6 +116,7 @@ add_task(async function load_2_pbm_serps_and_1_non_pbm_serp() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_remote_settings_sync.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_remote_settings_sync.js
index 5f2afcf6fc..a8a52ba794 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_remote_settings_sync.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_remote_settings_sync.js
@@ -86,7 +86,6 @@ add_setup(async function () {
// Enable local telemetry recording for the duration of the tests.
await SpecialPowers.pushPrefEnv({
set: [
- ["browser.search.serpEventTelemetry.enabled", true],
// Set the IPC count to a small number so that we only have to open
// one additional tab to reuse the same process.
["dom.ipc.processCount.webIsolated", 1],
@@ -139,6 +138,7 @@ add_task(async function update_telemetry_tab_already_open() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -192,6 +192,7 @@ add_task(async function update_telemetry_tab_closed() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -246,6 +247,7 @@ add_task(async function update_telemetry_multiple_tabs() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -307,6 +309,7 @@ add_task(async function update_telemetry_multiple_processes_and_tabs() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_shopping.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_shopping.js
index e2352b53f4..b687f025fd 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_shopping.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_shopping.js
@@ -55,9 +55,6 @@ add_setup(async function () {
// Enable local telemetry recording for the duration of the tests.
let oldCanRecord = Services.telemetry.canRecordExtended;
Services.telemetry.canRecordExtended = true;
- await SpecialPowers.pushPrefEnv({
- set: [["browser.search.serpEventTelemetry.enabled", true]],
- });
registerCleanupFunction(async () => {
SearchSERPTelemetry.overrideSearchTelemetryForTests();
@@ -83,6 +80,7 @@ async function loadSerpAndClickShoppingTab(page) {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "true",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -109,6 +107,7 @@ async function loadSerpAndClickShoppingTab(page) {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "true",
+ is_signed_in: "false",
},
engagements: [
{
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_signed_in_to_account.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_signed_in_to_account.js
new file mode 100644
index 0000000000..701016e5b0
--- /dev/null
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_signed_in_to_account.js
@@ -0,0 +1,187 @@
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
+
+/*
+ * Test to verify that the SERP impression event correctly records whether the
+ * user is logged in to a provider's account at the time of SERP load.
+ */
+
+"use strict";
+
+const TEST_PROVIDER_INFO = [
+ {
+ telemetryId: "example",
+ searchPageRegexp:
+ /^https:\/\/example.org\/browser\/browser\/components\/search\/test\/browser\/telemetry\/searchTelemetry(?:Ad)?/,
+ queryParamNames: ["s"],
+ accountCookies: [
+ {
+ host: "accounts.google.com",
+ name: "SID",
+ },
+ ],
+ codeParamName: "abc",
+ taggedCodes: ["ff"],
+ followOnParamNames: ["a"],
+ extraAdServersRegexps: [/^https:\/\/example\.com\/ad2?/],
+ components: [
+ {
+ type: SearchSERPTelemetryUtils.COMPONENTS.AD_LINK,
+ default: true,
+ },
+ ],
+ },
+];
+
+function simulateGoogleAccountSignIn() {
+ // Manually set the cookie that is present when the client is signed in to a
+ // Google account.
+ Services.cookies.add(
+ "accounts.google.com",
+ "",
+ "SID",
+ "dummy_cookie_value",
+ false,
+ false,
+ false,
+ Date.now() + 1000 * 60 * 60,
+ {},
+ Ci.nsICookie.SAMESITE_NONE,
+ Ci.nsICookie.SCHEME_HTTPS
+ );
+}
+
+add_setup(async function () {
+ SearchSERPTelemetry.overrideSearchTelemetryForTests(TEST_PROVIDER_INFO);
+ await waitForIdle();
+ // Enable local telemetry recording for the duration of the tests.
+ let oldCanRecord = Services.telemetry.canRecordExtended;
+ Services.telemetry.canRecordExtended = true;
+
+ registerCleanupFunction(async () => {
+ SearchSERPTelemetry.overrideSearchTelemetryForTests();
+ Services.telemetry.canRecordExtended = oldCanRecord;
+ resetTelemetry();
+ });
+});
+
+add_task(async function test_not_signed_in_to_google_account() {
+ info("Loading SERP while not signed in to Google account.");
+ let url = getSERPUrl("searchTelemetry.html");
+ let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, url);
+
+ assertSERPTelemetry([
+ {
+ impression: {
+ provider: "example",
+ tagged: "true",
+ partner_code: "ff",
+ source: "unknown",
+ is_shopping_page: "false",
+ is_private: "false",
+ shopping_tab_displayed: "false",
+ is_signed_in: "false",
+ },
+ },
+ ]);
+
+ BrowserTestUtils.removeTab(tab);
+ resetTelemetry();
+});
+
+add_task(async function test_signed_in_to_google_account() {
+ simulateGoogleAccountSignIn();
+
+ info("Loading SERP while signed in to Google account.");
+ let url = getSERPUrl("searchTelemetry.html");
+ let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, url);
+
+ assertSERPTelemetry([
+ {
+ impression: {
+ provider: "example",
+ tagged: "true",
+ partner_code: "ff",
+ source: "unknown",
+ is_shopping_page: "false",
+ is_private: "false",
+ shopping_tab_displayed: "false",
+ is_signed_in: "true",
+ },
+ },
+ ]);
+
+ BrowserTestUtils.removeTab(tab);
+ Services.cookies.removeAll();
+ resetTelemetry();
+});
+
+add_task(async function test_toggle_google_account_signed_in_status() {
+ info("Loading SERP while not signed in to Google account.");
+ let url = getSERPUrl("searchTelemetry.html");
+ let tab1 = await BrowserTestUtils.openNewForegroundTab(gBrowser, url);
+
+ assertSERPTelemetry([
+ {
+ impression: {
+ provider: "example",
+ tagged: "true",
+ partner_code: "ff",
+ source: "unknown",
+ is_shopping_page: "false",
+ is_private: "false",
+ shopping_tab_displayed: "false",
+ is_signed_in: "false",
+ },
+ },
+ ]);
+
+ resetTelemetry();
+
+ info("Signing in to Google account.");
+ simulateGoogleAccountSignIn();
+
+ info("Loading SERP after signing in to Google account.");
+ let tab2 = await BrowserTestUtils.openNewForegroundTab(gBrowser, url);
+ assertSERPTelemetry([
+ {
+ impression: {
+ provider: "example",
+ tagged: "true",
+ partner_code: "ff",
+ source: "unknown",
+ is_shopping_page: "false",
+ is_private: "false",
+ shopping_tab_displayed: "false",
+ is_signed_in: "true",
+ },
+ },
+ ]);
+
+ resetTelemetry();
+
+ info("Signing out of Google account.");
+ Services.cookies.removeAll();
+
+ info("Loading SERP after signing out of Google account.");
+ let tab3 = await BrowserTestUtils.openNewForegroundTab(gBrowser, url);
+ assertSERPTelemetry([
+ {
+ impression: {
+ provider: "example",
+ tagged: "true",
+ partner_code: "ff",
+ source: "unknown",
+ is_shopping_page: "false",
+ is_private: "false",
+ shopping_tab_displayed: "false",
+ is_signed_in: "false",
+ },
+ },
+ ]);
+
+ BrowserTestUtils.removeTab(tab1);
+ BrowserTestUtils.removeTab(tab2);
+ BrowserTestUtils.removeTab(tab3);
+ resetTelemetry();
+});
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources.js
index 7fa66a1adf..3cb246f21d 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources.js
@@ -63,7 +63,6 @@ add_setup(async function () {
],
// Ensure to add search suggestion telemetry as search_suggestion not search_formhistory.
["browser.urlbar.maxHistoricalSearchSuggestions", 0],
- ["browser.search.serpEventTelemetry.enabled", true],
],
});
// Enable local telemetry recording for the duration of the tests.
@@ -148,6 +147,7 @@ async function track_ad_click(
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_about.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_about.js
index a313c75ac7..fa596acac1 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_about.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_about.js
@@ -4,7 +4,6 @@
/*
* Main tests for SearchSERPTelemetry - general engine visiting and link
* clicking on about pages.
- *
*/
"use strict";
@@ -61,7 +60,6 @@ add_setup(async function () {
],
// Ensure to add search suggestion telemetry as search_suggestion not search_formhistory.
["browser.urlbar.maxHistoricalSearchSuggestions", 0],
- ["browser.search.serpEventTelemetry.enabled", true],
],
});
// Enable local telemetry recording for the duration of the tests.
@@ -146,6 +144,7 @@ async function track_ad_click(
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_ads.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_ads.js
index 0fd93da30f..97480b7d36 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_ads.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_ads.js
@@ -38,9 +38,6 @@ add_setup(async function () {
// Enable local telemetry recording for the duration of the tests.
let oldCanRecord = Services.telemetry.canRecordExtended;
Services.telemetry.canRecordExtended = true;
- await SpecialPowers.pushPrefEnv({
- set: [["browser.search.serpEventTelemetry.enabled", true]],
- });
registerCleanupFunction(async () => {
SearchSERPTelemetry.overrideSearchTelemetryForTests();
@@ -77,6 +74,7 @@ add_task(async function test_simple_search_page_visit() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
abandonment: {
reason: SearchSERPTelemetryUtils.ABANDONMENTS.TAB_CLOSE,
@@ -120,6 +118,7 @@ add_task(async function test_simple_search_page_visit_telemetry() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
abandonment: {
reason: SearchSERPTelemetryUtils.ABANDONMENTS.TAB_CLOSE,
@@ -156,6 +155,7 @@ add_task(async function test_follow_on_visit() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
abandonment: {
reason: SearchSERPTelemetryUtils.ABANDONMENTS.TAB_CLOSE,
@@ -170,6 +170,7 @@ add_task(async function test_follow_on_visit() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
abandonment: {
reason: SearchSERPTelemetryUtils.ABANDONMENTS.TAB_CLOSE,
@@ -205,6 +206,7 @@ add_task(async function test_track_ad() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -247,6 +249,7 @@ add_task(async function test_track_ad_organic() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -294,6 +297,7 @@ add_task(async function test_track_ad_new_window() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -349,6 +353,7 @@ add_task(async function test_track_ad_pages_without_ads() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
},
{
@@ -360,6 +365,7 @@ add_task(async function test_track_ad_pages_without_ads() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_ads_clicks.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_ads_clicks.js
index 11d2176563..1b7dee7f04 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_ads_clicks.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_ads_clicks.js
@@ -34,9 +34,6 @@ add_setup(async function () {
// Enable local telemetry recording for the duration of the tests.
let oldCanRecord = Services.telemetry.canRecordExtended;
Services.telemetry.canRecordExtended = true;
- await SpecialPowers.pushPrefEnv({
- set: [["browser.search.serpEventTelemetry.enabled", true]],
- });
registerCleanupFunction(async () => {
SearchSERPTelemetry.overrideSearchTelemetryForTests();
@@ -82,6 +79,7 @@ async function track_ad_click(testOrganic) {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -118,6 +116,7 @@ async function track_ad_click(testOrganic) {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -164,6 +163,7 @@ async function track_ad_click(testOrganic) {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -189,6 +189,7 @@ async function track_ad_click(testOrganic) {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -228,6 +229,7 @@ async function track_ad_click(testOrganic) {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -253,6 +255,7 @@ async function track_ad_click(testOrganic) {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -307,6 +310,7 @@ add_task(async function test_track_ad_click_with_location_change_other_tab() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -350,6 +354,7 @@ add_task(async function test_track_ad_click_with_location_change_other_tab() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_ads_data_attributes.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_ads_data_attributes.js
index 3c5e0a464e..02b716c423 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_ads_data_attributes.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_ads_data_attributes.js
@@ -2,7 +2,8 @@
* http://creativecommons.org/publicdomain/zero/1.0/ */
/*
- * Tests for SearchSERPTelemetry associated with ad links found in data attributes.
+ * Tests for SearchSERPTelemetry associated with ad links found in data
+ * attributes.
*/
"use strict";
@@ -34,9 +35,6 @@ add_setup(async function () {
// Enable local telemetry recording for the duration of the tests.
let oldCanRecord = Services.telemetry.canRecordExtended;
Services.telemetry.canRecordExtended = true;
- await SpecialPowers.pushPrefEnv({
- set: [["browser.search.serpEventTelemetry.enabled", true]],
- });
registerCleanupFunction(async () => {
SearchSERPTelemetry.overrideSearchTelemetryForTests();
@@ -76,6 +74,7 @@ add_task(async function test_track_ad_on_data_attributes() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -122,6 +121,7 @@ add_task(async function test_track_ad_on_data_attributes_and_hrefs() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -165,6 +165,7 @@ add_task(async function test_track_no_ad_on_data_attributes_and_hrefs() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
},
]);
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_ads_load_events.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_ads_load_events.js
index 069e13d339..b79f31b678 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_ads_load_events.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_ads_load_events.js
@@ -34,9 +34,6 @@ add_setup(async function () {
// Enable local telemetry recording for the duration of the tests.
let oldCanRecord = Services.telemetry.canRecordExtended;
Services.telemetry.canRecordExtended = true;
- await SpecialPowers.pushPrefEnv({
- set: [["browser.search.serpEventTelemetry.enabled", true]],
- });
registerCleanupFunction(async () => {
SearchSERPTelemetry.overrideSearchTelemetryForTests();
@@ -84,6 +81,7 @@ add_task(async function test_track_ad_on_DOMContentLoaded() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -126,6 +124,7 @@ add_task(async function test_track_ad_on_load_event() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_in_content.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_in_content.js
index 9bff667857..a7237506f6 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_in_content.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_in_content.js
@@ -43,9 +43,6 @@ const TEST_PROVIDER_INFO = [
add_setup(async function () {
SearchSERPTelemetry.overrideSearchTelemetryForTests(TEST_PROVIDER_INFO);
await waitForIdle();
- await SpecialPowers.pushPrefEnv({
- set: [["browser.search.serpEventTelemetry.enabled", true]],
- });
// Enable local telemetry recording for the duration of the tests.
let oldCanRecord = Services.telemetry.canRecordExtended;
Services.telemetry.canRecordExtended = true;
@@ -88,6 +85,7 @@ add_task(async function test_source_opened_in_new_tab_via_middle_click() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -113,6 +111,7 @@ add_task(async function test_source_opened_in_new_tab_via_middle_click() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -162,6 +161,7 @@ add_task(async function test_source_opened_in_new_tab_via_target_blank() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -187,6 +187,7 @@ add_task(async function test_source_opened_in_new_tab_via_target_blank() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -250,6 +251,7 @@ add_task(async function test_source_opened_in_new_tab_via_context_menu() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -275,6 +277,7 @@ add_task(async function test_source_opened_in_new_tab_via_context_menu() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -317,6 +320,7 @@ add_task(
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -343,6 +347,7 @@ add_task(
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -386,6 +391,7 @@ add_task(
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -412,6 +418,7 @@ add_task(
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -464,6 +471,7 @@ add_task(async function test_refinement_button_vs_opened_in_new_tab() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -489,6 +497,7 @@ add_task(async function test_refinement_button_vs_opened_in_new_tab() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_navigation.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_navigation.js
index 7ce681701a..58519d82ac 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_navigation.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_navigation.js
@@ -56,10 +56,7 @@ add_setup(async function () {
SearchSERPTelemetry.overrideSearchTelemetryForTests(TEST_PROVIDER_INFO);
await waitForIdle();
await SpecialPowers.pushPrefEnv({
- set: [
- ["browser.urlbar.suggest.searches", true],
- ["browser.search.serpEventTelemetry.enabled", true],
- ],
+ set: [["browser.urlbar.suggest.searches", true]],
});
// Enable local telemetry recording for the duration of the tests.
let oldCanRecord = Services.telemetry.canRecordExtended;
@@ -130,6 +127,7 @@ add_task(async function test_search() {
shopping_tab_displayed: "false",
is_shopping_page: "false",
is_private: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -172,6 +170,7 @@ add_task(async function test_reload() {
shopping_tab_displayed: "false",
is_shopping_page: "false",
is_private: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -194,6 +193,7 @@ add_task(async function test_reload() {
shopping_tab_displayed: "false",
is_shopping_page: "false",
is_private: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -233,6 +233,7 @@ add_task(async function test_reload() {
shopping_tab_displayed: "false",
is_shopping_page: "false",
is_private: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -255,6 +256,7 @@ add_task(async function test_reload() {
shopping_tab_displayed: "false",
is_shopping_page: "false",
is_private: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -306,6 +308,7 @@ add_task(async function test_fresh_search() {
shopping_tab_displayed: "false",
is_shopping_page: "false",
is_private: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -345,6 +348,7 @@ add_task(async function test_click_ad() {
shopping_tab_displayed: "false",
is_shopping_page: "false",
is_private: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -394,6 +398,7 @@ add_task(async function test_go_back() {
shopping_tab_displayed: "false",
is_shopping_page: "false",
is_private: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -419,6 +424,7 @@ add_task(async function test_go_back() {
shopping_tab_displayed: "false",
is_shopping_page: "false",
is_private: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -459,6 +465,7 @@ add_task(async function test_go_back() {
shopping_tab_displayed: "false",
is_shopping_page: "false",
is_private: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -484,6 +491,7 @@ add_task(async function test_go_back() {
shopping_tab_displayed: "false",
is_shopping_page: "false",
is_private: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -538,6 +546,7 @@ add_task(async function test_fresh_search_with_urlbar_persisted() {
shopping_tab_displayed: "false",
is_shopping_page: "false",
is_private: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -577,6 +586,7 @@ add_task(async function test_fresh_search_with_urlbar_persisted() {
shopping_tab_displayed: "false",
is_shopping_page: "false",
is_private: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -599,6 +609,7 @@ add_task(async function test_fresh_search_with_urlbar_persisted() {
shopping_tab_displayed: "false",
is_shopping_page: "false",
is_private: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -640,6 +651,7 @@ add_task(async function test_fresh_search_with_urlbar_persisted() {
shopping_tab_displayed: "false",
is_shopping_page: "false",
is_private: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -662,6 +674,7 @@ add_task(async function test_fresh_search_with_urlbar_persisted() {
shopping_tab_displayed: "false",
is_shopping_page: "false",
is_private: "false",
+ is_signed_in: "false",
},
engagements: [
{
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_webextension.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_webextension.js
index cb9e123622..1d31fc4456 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_webextension.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_sources_webextension.js
@@ -4,7 +4,6 @@
/*
* Main tests for SearchSERPTelemetry - general engine visiting and
* link clicking with Web Extensions.
- *
*/
"use strict";
@@ -42,7 +41,6 @@ add_setup(async function () {
],
// Ensure to add search suggestion telemetry as search_suggestion not search_formhistory.
["browser.urlbar.maxHistoricalSearchSuggestions", 0],
- ["browser.search.serpEventTelemetry.enabled", true],
],
});
// Enable local telemetry recording for the duration of the tests.
@@ -127,6 +125,7 @@ async function track_ad_click(
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_spa_in_content.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_spa_in_content.js
index 39270c7e9f..f0d731c577 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_spa_in_content.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_spa_in_content.js
@@ -52,6 +52,7 @@ add_task(async function test_content_process_type_search_click_suggestion() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -81,6 +82,7 @@ add_task(async function test_content_process_type_search_click_suggestion() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -125,6 +127,7 @@ add_task(
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -154,6 +157,7 @@ add_task(
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -197,6 +201,7 @@ add_task(async function test_content_process_engagement() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -246,6 +251,7 @@ add_task(async function test_content_process_engagement_that_changes_page() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -271,6 +277,7 @@ add_task(async function test_content_process_engagement_that_changes_page() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -319,6 +326,7 @@ add_task(
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -344,6 +352,7 @@ add_task(
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -369,6 +378,7 @@ add_task(
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -417,6 +427,7 @@ add_task(async function test_unload_listeners_single_tab() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -476,6 +487,7 @@ add_task(async function test_unload_listeners_multi_tab() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -501,6 +513,7 @@ add_task(async function test_unload_listeners_multi_tab() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_spa_multi_provider.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_spa_multi_provider.js
index 1e44957daa..d3b064ffbf 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_spa_multi_provider.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_spa_multi_provider.js
@@ -55,6 +55,7 @@ add_task(async function test_load_serps_and_click_organic() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -80,6 +81,7 @@ add_task(async function test_load_serps_and_click_organic() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -141,6 +143,7 @@ add_task(async function test_load_serps_and_click_ads() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -166,6 +169,7 @@ add_task(async function test_load_serps_and_click_ads() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -223,6 +227,7 @@ add_task(async function test_load_serps_and_click_related() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -248,6 +253,7 @@ add_task(async function test_load_serps_and_click_related() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -273,6 +279,7 @@ add_task(async function test_load_serps_and_click_related() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -292,6 +299,7 @@ add_task(async function test_load_serps_and_click_related() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -353,6 +361,7 @@ add_task(async function test_load_pages_tabhistory() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -379,6 +388,7 @@ add_task(async function test_load_pages_tabhistory() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -404,6 +414,7 @@ add_task(async function test_load_pages_tabhistory() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -426,6 +437,7 @@ add_task(async function test_load_pages_tabhistory() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -448,6 +460,7 @@ add_task(async function test_load_pages_tabhistory() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -467,6 +480,7 @@ add_task(async function test_load_pages_tabhistory() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -489,6 +503,7 @@ add_task(async function test_load_pages_tabhistory() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -511,6 +526,7 @@ add_task(async function test_load_pages_tabhistory() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_spa_multi_tab.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_spa_multi_tab.js
index 478a995e97..b5e54eb6bc 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_spa_multi_tab.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_spa_multi_tab.js
@@ -85,6 +85,7 @@ add_task(async function test_load_serps_and_click_related_searches() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -111,6 +112,7 @@ add_task(async function test_load_serps_and_click_related_searches() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -137,6 +139,7 @@ add_task(async function test_load_serps_and_click_related_searches() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -164,6 +167,7 @@ add_task(async function test_load_serps_and_click_related_searches() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -184,6 +188,7 @@ add_task(async function test_load_serps_and_click_related_searches() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -210,6 +215,7 @@ add_task(async function test_load_serps_and_click_related_searches() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -229,6 +235,7 @@ add_task(async function test_load_serps_and_click_related_searches() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -249,6 +256,7 @@ add_task(async function test_load_serps_and_click_related_searches() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [],
},
@@ -262,6 +270,7 @@ add_task(async function test_load_serps_and_click_related_searches() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [],
},
@@ -317,6 +326,7 @@ add_task(async function test_different_sources_click_ad() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -337,6 +347,7 @@ add_task(async function test_different_sources_click_ad() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -363,6 +374,7 @@ add_task(async function test_different_sources_click_ad() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -386,6 +398,7 @@ add_task(async function test_different_sources_click_ad() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -450,6 +463,7 @@ add_task(async function test_different_sources_click_redirect_ad_in_new_tab() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -470,6 +484,7 @@ add_task(async function test_different_sources_click_redirect_ad_in_new_tab() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -496,6 +511,7 @@ add_task(async function test_different_sources_click_redirect_ad_in_new_tab() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -519,6 +535,7 @@ add_task(async function test_different_sources_click_redirect_ad_in_new_tab() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -574,6 +591,7 @@ add_task(async function test_update_query_params_after_search() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -600,6 +618,7 @@ add_task(async function test_update_query_params_after_search() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -620,6 +639,7 @@ add_task(async function test_update_query_params_after_search() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -673,6 +693,7 @@ add_task(async function test_update_query_params() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -699,6 +720,7 @@ add_task(async function test_update_query_params() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -719,6 +741,7 @@ add_task(async function test_update_query_params() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -779,6 +802,7 @@ add_task(async function test_update_query_params_multiple_related() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -805,6 +829,7 @@ add_task(async function test_update_query_params_multiple_related() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -825,6 +850,7 @@ add_task(async function test_update_query_params_multiple_related() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -851,6 +877,7 @@ add_task(async function test_update_query_params_multiple_related() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_spa_single_tab.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_spa_single_tab.js
index 4f85c6cfa1..360e531c14 100644
--- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_spa_single_tab.js
+++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_spa_single_tab.js
@@ -37,6 +37,7 @@ add_task(async function test_load_serp() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -95,6 +96,7 @@ add_task(async function test_load_serp_and_push_unrelated_state() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -134,6 +136,7 @@ add_task(async function test_load_serp_and_load_non_serp_tab() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -176,6 +179,7 @@ add_task(async function test_load_serp_and_click_ad() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -207,6 +211,7 @@ add_task(async function test_load_serp_and_click_ad() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -251,6 +256,7 @@ add_task(async function test_load_serp_and_click_redirect_ad() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -294,6 +300,7 @@ add_task(async function test_load_serp_and_click_redirect_ad_in_new_tab() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -338,6 +345,7 @@ add_task(async function test_load_serp_click_a_related_search() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -363,6 +371,7 @@ add_task(async function test_load_serp_click_a_related_search() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -401,6 +410,7 @@ add_task(async function test_load_serp_click_a_related_search_click_ad() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -426,6 +436,7 @@ add_task(async function test_load_serp_click_a_related_search_click_ad() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -470,6 +481,7 @@ add_task(async function test_load_serp_click_non_serp_tab_click_all() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -509,6 +521,7 @@ add_task(async function test_load_serp_click_non_serp_tab_click_all() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -534,6 +547,7 @@ add_task(async function test_load_serp_click_non_serp_tab_click_all() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -576,6 +590,7 @@ add_task(async function test_load_serp_and_use_back_and_forward() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
engagements: [
{
@@ -601,6 +616,7 @@ add_task(async function test_load_serp_and_use_back_and_forward() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -623,6 +639,7 @@ add_task(async function test_load_serp_and_use_back_and_forward() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
@@ -645,6 +662,7 @@ add_task(async function test_load_serp_and_use_back_and_forward() {
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
+ is_signed_in: "false",
},
adImpressions: [
{
diff --git a/browser/components/search/test/marionette/telemetry/test_ping_submitted.py b/browser/components/search/test/marionette/telemetry/test_ping_submitted.py
index cefe2d72d1..0ad2095b30 100644
--- a/browser/components/search/test/marionette/telemetry/test_ping_submitted.py
+++ b/browser/components/search/test/marionette/telemetry/test_ping_submitted.py
@@ -63,6 +63,8 @@ class TestPingSubmitted(MarionetteTestCase):
provider: "example",
tagged: "true",
num_ads_clicked: "0",
+ num_ads_hidden: "0",
+ num_ads_loaded: "2",
num_ads_visible: "2",
});
"""
diff --git a/browser/components/search/test/unit/test_ui_schemas_valid.js b/browser/components/search/test/unit/test_ui_schemas_valid.js
index 3396f38238..17fb802085 100644
--- a/browser/components/search/test/unit/test_ui_schemas_valid.js
+++ b/browser/components/search/test/unit/test_ui_schemas_valid.js
@@ -7,7 +7,7 @@ let schemas = [
["search-telemetry-v2-schema.json", "search-telemetry-v2-ui-schema.json"],
];
-async function checkUISchemaValid(configSchema, uiSchema) {
+function checkUISchemaValid(configSchema, uiSchema) {
for (let key of Object.keys(configSchema.properties)) {
Assert.ok(
uiSchema["ui:order"].includes(key),
@@ -26,6 +26,6 @@ add_task(async function test_ui_schemas_valid() {
PathUtils.join(do_get_cwd().path, uiSchema)
);
- await checkUISchemaValid(schemaData, uiSchemaData);
+ checkUISchemaValid(schemaData, uiSchemaData);
}
});
diff --git a/browser/components/search/test/unit/test_urlTelemetry_generic.js b/browser/components/search/test/unit/test_urlTelemetry_generic.js
index e967002421..556e167681 100644
--- a/browser/components/search/test/unit/test_urlTelemetry_generic.js
+++ b/browser/components/search/test/unit/test_urlTelemetry_generic.js
@@ -7,7 +7,6 @@ ChromeUtils.defineESModuleGetters(this, {
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
SearchSERPTelemetry: "resource:///modules/SearchSERPTelemetry.sys.mjs",
SearchSERPTelemetryUtils: "resource:///modules/SearchSERPTelemetry.sys.mjs",
- SearchUtils: "resource://gre/modules/SearchUtils.sys.mjs",
TelemetryTestUtils: "resource://testing-common/TelemetryTestUtils.sys.mjs",
sinon: "resource://testing-common/Sinon.sys.mjs",
});
@@ -64,10 +63,11 @@ const TESTS = [
provider: "example",
tagged: "true",
partner_code: "ff",
+ source: "unknown",
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
- source: "unknown",
+ is_signed_in: "false",
},
},
{
@@ -81,10 +81,11 @@ const TESTS = [
provider: "example",
tagged: "true",
partner_code: "ff",
+ source: "unknown",
is_shopping_page: "true",
is_private: "false",
shopping_tab_displayed: "false",
- source: "unknown",
+ is_signed_in: "false",
},
},
{
@@ -98,10 +99,11 @@ const TESTS = [
provider: "example",
tagged: "true",
partner_code: "tb",
+ source: "unknown",
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
- source: "unknown",
+ is_signed_in: "false",
},
},
{
@@ -115,10 +117,11 @@ const TESTS = [
provider: "example",
tagged: "false",
partner_code: "foo",
+ source: "unknown",
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
- source: "unknown",
+ is_signed_in: "false",
},
},
{
@@ -132,10 +135,11 @@ const TESTS = [
provider: "example",
tagged: "false",
partner_code: "other",
+ source: "unknown",
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
- source: "unknown",
+ is_signed_in: "false",
},
},
{
@@ -149,10 +153,11 @@ const TESTS = [
provider: "example",
tagged: "false",
partner_code: "other",
+ source: "unknown",
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
- source: "unknown",
+ is_signed_in: "false",
},
},
{
@@ -166,10 +171,11 @@ const TESTS = [
provider: "example",
tagged: "false",
partner_code: "",
+ source: "unknown",
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
- source: "unknown",
+ is_signed_in: "false",
},
},
{
@@ -183,10 +189,11 @@ const TESTS = [
provider: "example",
tagged: "false",
partner_code: "",
+ source: "unknown",
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
- source: "unknown",
+ is_signed_in: "false",
},
},
{
@@ -200,10 +207,11 @@ const TESTS = [
provider: "example2",
tagged: "false",
partner_code: "",
+ source: "unknown",
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
- source: "unknown",
+ is_signed_in: "false",
},
},
];
@@ -259,10 +267,6 @@ async function testAdUrlClicked(serpUrl, adUrl, expectedAdKey) {
do_get_profile();
add_task(async function setup() {
- Services.prefs.setBoolPref(
- SearchUtils.BROWSER_SEARCH_PREF + "serpEventTelemetry.enabled",
- true
- );
Services.fog.initializeFOG();
await SearchSERPTelemetry.init();
SearchSERPTelemetry.overrideSearchTelemetryForTests(TEST_PROVIDER_INFO);