tor-browser

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

commit 6f3ed88ca126ae6161fd6dae3f68f5a5a7da30b8
parent 8ddc54c4d94ddfa47ea301a9a4edda44a1796680
Author: Ryan VanderMeulen <rvandermeulen@mozilla.com>
Date:   Wed,  1 Oct 2025 11:37:32 +0000

Bug 1991801 - Remove unnecessary macOS version checks. r=firefox-desktop-core-reviewers ,Gijs

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

Diffstat:
Mbrowser/components/shell/test/browser_1119088.js | 10++--------
Mbrowser/components/uitour/UITour.sys.mjs | 5+----
Msecurity/sandbox/test/browser_content_sandbox_fs_tests.js | 14--------------
Mtoolkit/content/tests/chrome/bug263683_window.xhtml | 6------
Mtoolkit/modules/subprocess/Subprocess.sys.mjs | 2+-
5 files changed, 4 insertions(+), 33 deletions(-)

diff --git a/browser/components/shell/test/browser_1119088.js b/browser/components/shell/test/browser_1119088.js @@ -13,9 +13,7 @@ if (AppConstants.isPlatformAndVersionAtLeast("macosx", 23.0)) { const kDesktopCheckerScriptPath = "browser/browser/components/shell/test/mac_desktop_image.py"; -const kDefaultBackgroundImage_10_14 = - "/Library/Desktop Pictures/Solid Colors/Teal.png"; -const kDefaultBackgroundImage_10_15 = +const kDefaultBackgroundImage = "/System/Library/Desktop Pictures/Solid Colors/Teal.png"; ChromeUtils.defineESModuleGetters(this, { @@ -81,11 +79,7 @@ function setAndCheckDesktopBackgroundCLI(imagePath) { // in the automated test environment, not the OS default. function restoreDefaultBackground() { let defaultBackgroundPath; - if (AppConstants.isPlatformAndVersionAtLeast("macosx", 19)) { - defaultBackgroundPath = kDefaultBackgroundImage_10_15; - } else { - defaultBackgroundPath = kDefaultBackgroundImage_10_14; - } + defaultBackgroundPath = kDefaultBackgroundImage; setAndCheckDesktopBackgroundCLI(defaultBackgroundPath); } diff --git a/browser/components/uitour/UITour.sys.mjs b/browser/components/uitour/UITour.sys.mjs @@ -1773,10 +1773,7 @@ export var UITour = { appinfo.defaultBrowser = isDefaultBrowser; let canSetDefaultBrowserInBackground = true; - if ( - AppConstants.platform == "win" || - AppConstants.isPlatformAndVersionAtLeast("macosx", "10.10") - ) { + if (AppConstants.platform == "win" || AppConstants.platform == "macosx") { canSetDefaultBrowserInBackground = false; } else if (AppConstants.platform == "linux") { // The ShellService may not exist on some versions of Linux. diff --git a/security/sandbox/test/browser_content_sandbox_fs_tests.js b/security/sandbox/test/browser_content_sandbox_fs_tests.js @@ -333,20 +333,6 @@ async function testFileAccessMacOnly() { func: readDir, }); - // /Network is not present on macOS 10.15 (xnu 19). Don't - // test this directory on 10.15 and later. - if (AppConstants.isPlatformAndVersionAtMost("macosx", 18)) { - // Test that we cannot read from /Network at level 3 - let network = GetDir("/Network"); - tests.push({ - desc: "/Network", - ok: false, - browser: webBrowser, - file: network, - minLevel: minHomeReadSandboxLevel(), - func: readDir, - }); - } // Test that we cannot read from /Users at level 3 let users = GetDir("/Users"); tests.push({ diff --git a/toolkit/content/tests/chrome/bug263683_window.xhtml b/toolkit/content/tests/chrome/bug263683_window.xhtml @@ -47,12 +47,6 @@ } async function startTestWithBrowser(browserId) { - // We're bailing out when testing a remote browser on OSX 10.6, because it - // fails permanently. - if (browserId.endsWith("remote") && AppConstants.isPlatformAndVersionAtMost("macosx", 11)) { - return; - } - info("Starting test with browser '" + browserId + "'"); gBrowser = document.getElementById(browserId); gFindBar.browser = gBrowser; diff --git a/toolkit/modules/subprocess/Subprocess.sys.mjs b/toolkit/modules/subprocess/Subprocess.sys.mjs @@ -39,7 +39,7 @@ function encodeEnvVar(name, value) { } function platformSupportsDisclaimedSpawn() { - return AppConstants.isPlatformAndVersionAtLeast("macosx", 18); + return AppConstants.platform === "macosx"; } /**