tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 170744127aa75c8de003df70574f8a6d6fdf7432
parent 54b19c8ae3eb860161e9aad25f1ee7618e01b993
Author: Alexandru Marc <amarc@mozilla.com>
Date:   Fri, 12 Dec 2025 05:22:12 +0200

Revert "Bug 2001752 - count interactions with list all tabs menu items r=mconley,tabbrowser-reviewers,nsharpley" for causing bc failures at browser_tab_drag_drop_perwindow

This reverts commit 5b8f66f51002a6254b998a9af11d2ee14ac80852.

Diffstat:
Mbrowser/components/tabbrowser/content/browser-allTabsMenu.js | 5-----
Mbrowser/components/tabbrowser/metrics.yaml | 19-------------------
Mbrowser/components/tabbrowser/test/browser/tabs/browser.toml | 2--
Dbrowser/components/tabbrowser/test/browser/tabs/browser_list_all_tabs_telemetry.js | 109-------------------------------------------------------------------------------
Mbrowser/components/tabbrowser/test/browser/tabs/browser_tab_manager_synced_tabs.js | 33---------------------------------
5 files changed, 0 insertions(+), 168 deletions(-)

diff --git a/browser/components/tabbrowser/content/browser-allTabsMenu.js b/browser/components/tabbrowser/content/browser-allTabsMenu.js @@ -117,13 +117,9 @@ var gTabsPanel = { let { PanelUI } = target.ownerGlobal; switch (target.id) { case "allTabsMenu-searchTabs": - Glean.browserUiInteraction.listAllTabsAction.search_tabs.add(1); this.searchTabs(); break; case "allTabsMenu-closeDuplicateTabs": - Glean.browserUiInteraction.listAllTabsAction.close_all_duplicates.add( - 1 - ); gBrowser.removeAllDuplicateTabs(); break; case "allTabsMenu-containerTabsButton": @@ -133,7 +129,6 @@ var gTabsPanel = { PanelUI.showSubView(this.kElements.hiddenTabsView, target); break; case "allTabsMenu-syncedTabs": - Glean.browserUiInteraction.listAllTabsAction.tabs_from_devices.add(1); SidebarController.show("viewTabsSidebar"); break; case "allTabsMenu-groupsViewShowMore": diff --git a/browser/components/tabbrowser/metrics.yaml b/browser/components/tabbrowser/metrics.yaml @@ -132,25 +132,6 @@ browser.ui.interaction: expires: never telemetry_mirror: BROWSER_UI_INTERACTION_ALL_TABS_PANEL_ENTRYPOINT - list_all_tabs_action: - type: labeled_counter - description: > - Records how often users interact with any top-level menu option in the - "List All Tabs" menu. - bugs: - - https://bugzil.la/2001752 - data_reviews: - - https://bugzil.la/2001752 - data_sensitivity: - - interaction - notification_emails: - - sthompson@mozilla.com - expires: never - labels: - - close_all_duplicates # "Close all duplicate tabs" menu item - - tabs_from_devices # "Tabs from other devices" menu item - - search_tabs # "Search tabs" menu item - tab_movement: type: labeled_counter description: > diff --git a/browser/components/tabbrowser/test/browser/tabs/browser.toml b/browser/components/tabbrowser/test/browser/tabs/browser.toml @@ -202,8 +202,6 @@ skip-if = [ "os == 'mac' && os_version == '15.30' && arch == 'aarch64'", # Bug 1904826 ] -["browser_list_all_tabs_telemetry.js"] - ["browser_long_data_url_label_truncation.js"] tags = "vertical-tabs" diff --git a/browser/components/tabbrowser/test/browser/tabs/browser_list_all_tabs_telemetry.js b/browser/components/tabbrowser/test/browser/tabs/browser_list_all_tabs_telemetry.js @@ -1,109 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - https://creativecommons.org/publicdomain/zero/1.0/ */ - -"use strict"; - -async function resetTelemetry() { - await Services.fog.testFlushAllChildren(); - Services.fog.testResetFOG(); -} - -add_setup(async () => { - await resetTelemetry(); -}); - -registerCleanupFunction(async () => { - await resetTelemetry(); -}); - -add_task(async function test_list_all_tabs_telemetry_close_duplicate_tabs() { - const win = await BrowserTestUtils.openNewBrowserWindow(); - - // Prevent a confirmation message from showing up during the test because - // this test doesn't need to exercise that functionality. - await SpecialPowers.pushPrefEnv({ - set: [["browser.tabs.haveShownCloseAllDuplicateTabsWarning", true]], - }); - - // Create 2 tabs with the same URL so that there are duplicate tabs present. - await Promise.all([addTabTo(win.gBrowser), addTabTo(win.gBrowser)]); - - win.gTabsPanel.init(); - - Assert.equal( - Glean.browserUiInteraction.listAllTabsAction.close_all_duplicates.testGetValue(), - undefined, - "interaction count for close duplicate tabs starts unset" - ); - - const button = win.document.getElementById("alltabs-button"); - - const allTabsView = win.document.getElementById("allTabsMenu-allTabsView"); - const allTabsPopupShownPromise = BrowserTestUtils.waitForEvent( - allTabsView, - "ViewShown" - ); - button.click(); - await allTabsPopupShownPromise; - - const closeDuplicateTabsButton = win.document.getElementById( - "allTabsMenu-closeDuplicateTabs" - ); - closeDuplicateTabsButton.click(); - - await BrowserTestUtils.waitForCondition(() => { - return ( - Glean.browserUiInteraction.listAllTabsAction.close_all_duplicates.testGetValue() == - 1 - ); - }, "Wait for metric to increment"); - Assert.equal( - Glean.browserUiInteraction.listAllTabsAction.close_all_duplicates.testGetValue(), - 1, - "interaction count for close duplicate tabs should be 1 after clicking on the menu item" - ); - - await BrowserTestUtils.closeWindow(win); - await SpecialPowers.popPrefEnv(); -}); - -add_task(async function test_list_all_tabs_telemetry_search_tabs() { - const win = await BrowserTestUtils.openNewBrowserWindow(); - - win.gTabsPanel.init(); - - Assert.equal( - Glean.browserUiInteraction.listAllTabsAction.search_tabs.testGetValue(), - undefined, - "interaction count for search tabs starts unset" - ); - - const button = win.document.getElementById("alltabs-button"); - - const allTabsView = win.document.getElementById("allTabsMenu-allTabsView"); - const allTabsPopupShownPromise = BrowserTestUtils.waitForEvent( - allTabsView, - "ViewShown" - ); - button.click(); - await allTabsPopupShownPromise; - - const searchTabsButton = win.document.getElementById( - "allTabsMenu-searchTabs" - ); - searchTabsButton.click(); - - await BrowserTestUtils.waitForCondition(() => { - return ( - Glean.browserUiInteraction.listAllTabsAction.search_tabs.testGetValue() == - 1 - ); - }, "Wait for metric to increment"); - Assert.equal( - Glean.browserUiInteraction.listAllTabsAction.search_tabs.testGetValue(), - 1, - "interaction count for search tabs should be 1 after clicking on the menu item" - ); - - await BrowserTestUtils.closeWindow(win); -}); diff --git a/browser/components/tabbrowser/test/browser/tabs/browser_tab_manager_synced_tabs.js b/browser/components/tabbrowser/test/browser/tabs/browser_tab_manager_synced_tabs.js @@ -1,16 +1,4 @@ -/* Any copyright is dedicated to the Public Domain. - https://creativecommons.org/publicdomain/zero/1.0/ */ - -"use strict"; - -async function resetTelemetry() { - await Services.fog.testFlushAllChildren(); - Services.fog.testResetFOG(); -} - add_setup(async function () { - await resetTelemetry(); - const previous = PlacesUIUtils.shouldShowTabsFromOtherComputersMenuitem; registerCleanupFunction(async () => { @@ -20,18 +8,9 @@ add_setup(async function () { PlacesUIUtils.shouldShowTabsFromOtherComputersMenuitem = () => true; }); -registerCleanupFunction(async () => { - await resetTelemetry(); -}); - add_task(async function tab_manager_synced_tabs() { let win = await BrowserTestUtils.openNewBrowserWindow(); win.gTabsPanel.init(); - Assert.equal( - Glean.browserUiInteraction.listAllTabsAction.tabs_from_devices.testGetValue(), - undefined, - "interaction count for tabs from other devices starts unset" - ); let button = win.document.getElementById("alltabs-button"); let allTabsView = win.document.getElementById("allTabsMenu-allTabsView"); @@ -57,17 +36,5 @@ add_task(async function tab_manager_synced_tabs() { "Synced tabs side bar is being displayed" ); - await BrowserTestUtils.waitForCondition(() => { - return ( - Glean.browserUiInteraction.listAllTabsAction.tabs_from_devices.testGetValue() == - 1 - ); - }, "Wait for metric to increment"); - Assert.equal( - Glean.browserUiInteraction.listAllTabsAction.tabs_from_devices.testGetValue(), - 1, - "interaction count for tabs from other devices should be 1 after clicking on the menu item" - ); - await BrowserTestUtils.closeWindow(win); });