tor-browser

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

commit c5b04b025505b029ff10cd14e369fc254b476ef4
parent 51bb09d070987c87690fb57de9f171b36e17789b
Author: Tom Marble <tmarble@info9.net>
Date:   Thu, 16 Oct 2025 21:35:48 +0000

Bug 1994846 - PlatformInfo special case macos 15.00 -> 15.30 r=jmaher

Signed-off-by: Tom Marble <tmarble@info9.net>

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

Diffstat:
Mtesting/mozbase/mozinfo/mozinfo/platforminfo.py | 7+++++--
Mtesting/mozbase/mozinfo/tests/test_platforminfo.py | 6++++++
2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/testing/mozbase/mozinfo/mozinfo/platforminfo.py b/testing/mozbase/mozinfo/mozinfo/platforminfo.py @@ -113,8 +113,11 @@ class PlatformInfo: if self.os in ["mac", "linux"]: # Hack for macosx 11.20 reported as 11.00 - if self.os == "mac" and version == "1100": - return "11.20" + if self.os == "mac": + if version == "1100": + return "11.20" + elif version == "1500": + return "15.30" if len(version) == 5 and version[2] == ".": return version # already has a dot return version[0:2] + "." + version[2:4] diff --git a/testing/mozbase/mozinfo/tests/test_platforminfo.py b/testing/mozbase/mozinfo/tests/test_platforminfo.py @@ -67,6 +67,12 @@ def test_os_version(): platform_info = PlatformInfo(test_settings) assert platform_info.os_version == "11.20" + # Macos 15 has specific hacks + test_settings["platform"]["os"]["name"] = "macosx" + test_settings["platform"]["os"]["version"] = "1500" + platform_info = PlatformInfo(test_settings) + assert platform_info.os_version == "15.30" + # Android os version gets converted to sdk version test_settings["platform"]["os"]["name"] = "android" test_settings["platform"]["os"]["version"] = "14.0"