1414# KIND, either express or implied. See the License for the
1515# specific language governing permissions and limitations
1616# under the License.
17+ import sys
18+
1719import pytest
1820
1921from selenium .webdriver .common .bidi .emulation import (
@@ -117,6 +119,7 @@ def test_emulation_initialized(driver):
117119 assert isinstance (driver .emulation , Emulation )
118120
119121
122+ @pytest .mark .xfail_firefox (reason = "Firefox BiDi geolocation override does not work with contexts parameter" )
120123def test_set_geolocation_override_with_coordinates_in_context (driver , pages ):
121124 context_id = driver .current_window_handle
122125 pages .load ("blank.html" )
@@ -132,6 +135,10 @@ def test_set_geolocation_override_with_coordinates_in_context(driver, pages):
132135 assert abs (result ["accuracy" ] - coords .accuracy ) < 1.0 , f"Accuracy mismatch: { result ['accuracy' ]} "
133136
134137
138+ @pytest .mark .xfail_firefox (
139+ condition = sys .platform == "win32" ,
140+ reason = "Firefox + Windows: navigator.geolocation.getCurrentPosition returns None" ,
141+ )
135142def test_set_geolocation_override_with_coordinates_in_user_context (driver , pages ):
136143 # Create a user context
137144 user_context = driver .browser .create_user_context ()
@@ -156,6 +163,10 @@ def test_set_geolocation_override_with_coordinates_in_user_context(driver, pages
156163 driver .browser .remove_user_context (user_context )
157164
158165
166+ @pytest .mark .xfail_firefox (
167+ condition = sys .platform == "win32" ,
168+ reason = "Firefox + Windows: navigator.geolocation.getCurrentPosition returns None" ,
169+ )
159170def test_set_geolocation_override_all_coords (driver , pages ):
160171 context_id = driver .current_window_handle
161172 pages .load ("blank.html" )
@@ -181,6 +192,10 @@ def test_set_geolocation_override_all_coords(driver, pages):
181192 driver .browsing_context .close (context_id )
182193
183194
195+ @pytest .mark .xfail_firefox (
196+ condition = sys .platform == "win32" ,
197+ reason = "Firefox + Windows: navigator.geolocation.getCurrentPosition returns None" ,
198+ )
184199def test_set_geolocation_override_with_multiple_contexts (driver , pages ):
185200 # Create two browsing contexts
186201 context1_id = driver .browsing_context .create (type = WindowTypes .TAB )
@@ -214,6 +229,10 @@ def test_set_geolocation_override_with_multiple_contexts(driver, pages):
214229 driver .browsing_context .close (context2_id )
215230
216231
232+ @pytest .mark .xfail_firefox (
233+ condition = sys .platform == "win32" ,
234+ reason = "Firefox + Windows: navigator.geolocation.getCurrentPosition returns None" ,
235+ )
217236def test_set_geolocation_override_with_multiple_user_contexts (driver , pages ):
218237 # Create two user contexts
219238 user_context1 = driver .browser .create_user_context ()
0 commit comments