mirror of
https://github.com/daijro/camoufox.git
synced 2026-11-19 00:07:28 +00:00
Leave EME at the build's default for Windows identities
Windows Firefox has PlayReady behind EME; a Linux build cannot supply it, so turning media.eme.enabled on claimed more than the build delivers. The pref is no longer among the Windows behaviour defaults, and the Python and TypeScript tests now require that it is left alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
4b48bffd74
commit
4e2515bc64
@@ -40,7 +40,6 @@
|
||||
"browser.cache.disk.smart_size.enabled": true
|
||||
},
|
||||
"windowsBehaviourPrefs": {
|
||||
"media.eme.enabled": true,
|
||||
"layout.word_select.eat_space_to_next_word": true,
|
||||
"general.autoScroll": true,
|
||||
"middlemouse.paste": false,
|
||||
|
||||
@@ -57,8 +57,6 @@ CACHE_PREFS: Dict[str, Any] = LAUNCHER_CONSTANTS['cachePrefs']
|
||||
# Prefs whose Firefox 156 default differs between the Windows and Linux builds
|
||||
# (all.js, firefox.js, StaticPrefList.yaml) and that a page or the user can
|
||||
# observe, set to the Windows default:
|
||||
# - media.eme.enabled: Linux ships EME off, so requestMediaKeySystemAccess()
|
||||
# rejects with "EME has been preffed off", a message only Linux gives.
|
||||
# - eat_space_to_next_word: double-click selects the trailing space too.
|
||||
# - general.autoScroll, middlemouse.*, searchclipboardfor.middleclick,
|
||||
# clipboard.autocopy: middle click autoscrolls. Linux instead pastes the
|
||||
@@ -70,7 +68,8 @@ CACHE_PREFS: Dict[str, Any] = LAUNCHER_CONSTANTS['cachePrefs']
|
||||
# a thumb dragged far off snaps back, and holding on the track stops at
|
||||
# the pointer.
|
||||
# Windows-only machinery (DirectComposition, ClearType, WMF) does nothing in a
|
||||
# Linux build and is left out.
|
||||
# Linux build and is left out, as is media.eme.enabled: Windows has PlayReady
|
||||
# behind EME, which a Linux build cannot supply.
|
||||
WINDOWS_BEHAVIOUR_PREFS: Dict[str, Any] = LAUNCHER_CONSTANTS['windowsBehaviourPrefs']
|
||||
|
||||
|
||||
|
||||
@@ -86,13 +86,19 @@ def test_windows_identity_gets_windows_behaviour(launch):
|
||||
assert prefs[pref] == value
|
||||
# Spot checks against stock Firefox on Windows, so an edit to the table
|
||||
# cannot quietly agree with itself.
|
||||
assert prefs["media.eme.enabled"] is True
|
||||
assert prefs["middlemouse.paste"] is False
|
||||
assert prefs["general.autoScroll"] is True
|
||||
assert prefs["layout.word_select.eat_space_to_next_word"] is True
|
||||
assert prefs["full-screen-api.transition-duration.enter"] == "200 200"
|
||||
|
||||
|
||||
def test_windows_identity_leaves_eme_off(launch):
|
||||
# Windows Firefox has PlayReady behind EME; a Linux build cannot, so EME on
|
||||
# would claim key systems it does not deliver. The build's default stands.
|
||||
_, prefs = launch(WIN_UA)
|
||||
assert "media.eme.enabled" not in prefs
|
||||
|
||||
|
||||
@pytest.mark.parametrize("ua", [MAC_UA, LIN_UA])
|
||||
def test_other_identities_keep_host_behaviour(launch, ua):
|
||||
_, prefs = launch(ua)
|
||||
|
||||
Reference in New Issue
Block a user