tor-browser

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

commit aca2ac519fa26f126c50bb4c64ca86c53d289cad
parent d95936a3127efd855bf5a109dd77063eccc1148d
Author: Jeremy Swinarton <jswinarton@mozilla.com>
Date:   Wed, 31 Dec 2025 13:47:31 +0000

Bug 2007261: Disable tab notes tests in browser_tab_preview.js if tab notes pref is disabled r=sthompson,tabbrowser-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D277668

Diffstat:
Mbrowser/components/tabbrowser/test/browser/tabs/browser_tab_preview.js | 11+++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/browser/components/tabbrowser/test/browser/tabs/browser_tab_preview.js b/browser/components/tabbrowser/test/browser/tabs/browser_tab_preview.js @@ -558,9 +558,13 @@ add_task(async function tabContentChangeTests() { * Test that if a note is set on a tab, the note appears in the preview panel */ add_task(async function tabNotesTests() { - await SpecialPowers.pushPrefEnv({ - set: [["browser.tabs.notes.enabled", true]], - }); + if (!Services.prefs.getBoolPref("browser.tabs.notes.enabled", false)) { + // Skip tests if tab notes is not enabled + // This is necessary because some tab notes functionality only loads at + // startup if the pref is enabled + todo(false, "Skip when tab notes is not enabled; see bug2008033"); + return; + } const previewPanel = document.getElementById(TAB_PREVIEW_PANEL_ID); const noteText = "Hello world"; @@ -602,7 +606,6 @@ add_task(async function tabNotesTests() { BrowserTestUtils.removeTab(tab); await resetState(); - await SpecialPowers.popPrefEnv(); }); /*