File tree Expand file tree Collapse file tree 4 files changed +128
-0
lines changed
Expand file tree Collapse file tree 4 files changed +128
-0
lines changed Original file line number Diff line number Diff line change 1+ import sys
2+
3+ import pytest
4+ from tests .support .helpers import deep_update
5+
6+
7+ @pytest .fixture
8+ def default_capabilities (request ):
9+ """Firefox/Linux workaround to disable baseline FPP for fullscreen tests.
10+
11+ This is a hack for Firefox on Linux only. The maximize detection heuristic
12+ compares window.outerWidth/Height to screen.availWidth/Height. With Firefox's
13+ baseline fingerprinting protection (bFPP) enabled in Nightly,
14+ screen.availWidth/Height are spoofed while window dimensions are not,
15+ causing the heuristic to fail.
16+ See https://bugzilla.mozilla.org/show_bug.cgi?id=1990514 for details.
17+ """
18+ capabilities = request .getfixturevalue ("default_capabilities" )
19+
20+ if sys .platform .startswith ("linux" ):
21+ deep_update (
22+ capabilities ,
23+ {
24+ "moz:firefoxOptions" : {
25+ "prefs" : {
26+ "privacy.baselineFingerprintingProtection" : False
27+ }
28+ }
29+ }
30+ )
31+
32+ return capabilities
Original file line number Diff line number Diff line change 1+ import sys
2+
3+ import pytest
4+ from tests .support .helpers import deep_update
5+
6+
7+ @pytest .fixture
8+ def default_capabilities (request ):
9+ """Firefox/Linux workaround to disable baseline FPP for maximize tests.
10+
11+ This is a hack for Firefox on Linux only. The maximize detection heuristic
12+ compares window.outerWidth/Height to screen.availWidth/Height. With Firefox's
13+ baseline fingerprinting protection (bFPP) enabled in Nightly,
14+ screen.availWidth/Height are spoofed while window dimensions are not,
15+ causing the heuristic to fail.
16+ See https://bugzilla.mozilla.org/show_bug.cgi?id=1990514 for details.
17+ """
18+ capabilities = request .getfixturevalue ("default_capabilities" )
19+
20+ if sys .platform .startswith ("linux" ):
21+ deep_update (
22+ capabilities ,
23+ {
24+ "moz:firefoxOptions" : {
25+ "prefs" : {
26+ "privacy.baselineFingerprintingProtection" : False
27+ }
28+ }
29+ }
30+ )
31+
32+ return capabilities
Original file line number Diff line number Diff line change 1+ import sys
2+
3+ import pytest
4+ from tests .support .helpers import deep_update
5+
6+
7+ @pytest .fixture
8+ def default_capabilities (request ):
9+ """Firefox/Linux workaround to disable baseline FPP for minimize tests.
10+
11+ This is a hack for Firefox on Linux only. The maximize detection heuristic
12+ compares window.outerWidth/Height to screen.availWidth/Height. With Firefox's
13+ baseline fingerprinting protection (bFPP) enabled in Nightly,
14+ screen.availWidth/Height are spoofed while window dimensions are not,
15+ causing the heuristic to fail.
16+ See https://bugzilla.mozilla.org/show_bug.cgi?id=1990514 for details.
17+ """
18+ capabilities = request .getfixturevalue ("default_capabilities" )
19+
20+ if sys .platform .startswith ("linux" ):
21+ deep_update (
22+ capabilities ,
23+ {
24+ "moz:firefoxOptions" : {
25+ "prefs" : {
26+ "privacy.baselineFingerprintingProtection" : False
27+ }
28+ }
29+ }
30+ )
31+
32+ return capabilities
Original file line number Diff line number Diff line change 1+ import sys
2+
3+ import pytest
4+ from tests .support .helpers import deep_update
5+
6+
7+ @pytest .fixture
8+ def default_capabilities (request ):
9+ """Firefox workaround to disable baseline FPP for set_window_rect tests.
10+
11+ This is a hack for Firefox on Linux and Mac. The maximize detection heuristic
12+ compares window.outerWidth/Height to screen.availWidth/Height. With Firefox's
13+ baseline fingerprinting protection (bFPP) enabled in Nightly,
14+ screen.availWidth/Height are spoofed while window dimensions are not,
15+ causing the heuristic to fail.
16+ See https://bugzilla.mozilla.org/show_bug.cgi?id=1990514 for details.
17+ """
18+ capabilities = request .getfixturevalue ("default_capabilities" )
19+
20+ if sys .platform .startswith ("linux" ) or sys .platform == "darwin" :
21+ deep_update (
22+ capabilities ,
23+ {
24+ "moz:firefoxOptions" : {
25+ "prefs" : {
26+ "privacy.baselineFingerprintingProtection" : False
27+ }
28+ }
29+ }
30+ )
31+
32+ return capabilities
You can’t perform that action at this time.
0 commit comments