fix: sync wrapper with v11-v13 binary changes

- Rename --timezone to --fingerprint-timezone (breaking binary change in v13)
- Remove --fingerprint-taskbar-height from defaults (binary auto-applies per platform)
- Update viewport height 955→947 (48px Win taskbar default)
- Update patch count 26→25 (patch 003 deleted in v11)
- Document new flags: --fingerprint-fonts-dir, --enable-blink-features=FakeShadowRoot, --fingerprint-taskbar-height (optional override)
- Fix README: remove incorrect "defaults to windows" claim
This commit is contained in:
CloakHQ
2026-03-02 23:13:04 +01:00
parent 3b256c413b
commit 3afe20cda2
12 changed files with 64 additions and 53 deletions
+7 -7
View File
@@ -4,9 +4,9 @@ from cloakbrowser.browser import _build_args
def test_timezone_injected():
"""--timezone flag should appear when timezone is set."""
"""--fingerprint-timezone flag should appear when timezone is set."""
args = _build_args(stealth_args=True, extra_args=None, timezone="America/New_York")
assert "--timezone=America/New_York" in args
assert "--fingerprint-timezone=America/New_York" in args
def test_locale_injected():
@@ -18,14 +18,14 @@ def test_locale_injected():
def test_both_injected():
"""Both flags should appear when both are set."""
args = _build_args(stealth_args=True, extra_args=None, timezone="Europe/Berlin", locale="de-DE")
assert "--timezone=Europe/Berlin" in args
assert "--fingerprint-timezone=Europe/Berlin" in args
assert "--lang=de-DE" in args
def test_timezone_independent_of_stealth_args():
"""--timezone should be injected even when stealth_args=False."""
"""--fingerprint-timezone should be injected even when stealth_args=False."""
args = _build_args(stealth_args=False, extra_args=None, timezone="America/New_York", locale="en-US")
assert "--timezone=America/New_York" in args
assert "--fingerprint-timezone=America/New_York" in args
assert "--lang=en-US" in args
# No stealth fingerprint args
assert not any(a.startswith("--fingerprint=") for a in args)
@@ -34,7 +34,7 @@ def test_timezone_independent_of_stealth_args():
def test_no_flags_when_not_set():
"""No timezone/lang flags when params are None."""
args = _build_args(stealth_args=True, extra_args=None)
assert not any(a.startswith("--timezone=") for a in args)
assert not any(a.startswith("--fingerprint-timezone=") for a in args)
assert not any(a.startswith("--lang=") for a in args)
@@ -42,5 +42,5 @@ def test_extra_args_preserved():
"""Extra args should still be included alongside timezone/locale."""
args = _build_args(stealth_args=True, extra_args=["--disable-gpu"], timezone="Asia/Tokyo", locale="ja-JP")
assert "--disable-gpu" in args
assert "--timezone=Asia/Tokyo" in args
assert "--fingerprint-timezone=Asia/Tokyo" in args
assert "--lang=ja-JP" in args