Skip to content

[wdspec] Add a test for "emulation.setGeolocationOverride" command to…

ea60d4e
Select commit
Loading
Failed to load commit list.
Merged

[Gecko Bug 1998732] [wdspec] Add a test for "emulation.setGeolocationOverride" command to set an override to a browsing context and then to a user context. #57040

[wdspec] Add a test for "emulation.setGeolocationOverride" command to…
ea60d4e
Select commit
Loading
Failed to load commit list.
Community-TC Integration / wpt-firefox-nightly-results succeeded Jan 7, 2026 in 5m 38s

Community-TC (pull_request)

Collect results for all tests affected by a pull request in firefox.

Details

View task in Taskcluster | View logs in Taskcluster | View task group in Taskcluster

Task Status

Started: 2026-01-07T13:57:05.658Z
Resolved: 2026-01-07T14:00:32.937Z
Task Execution Time: 3 minutes, 27 seconds, 279 milliseconds
Task Status: completed
Reason Resolved: completed
RunId: 0

Artifacts

- public/logs/live_backing.log
- public/logs/live.log
- public/results/checkrun.md
- public/results/wpt_report.json.gz
- public/results/wpt_screenshot.txt.gz

WPT Command: python3 ./wpt run --channel=nightly --no-fail-on-unexpected --log-wptreport=../artifacts/wpt_report.json --log-wptscreenshot=../artifacts/wpt_screenshot.txt --affected base_head --log-mach-level=info --log-mach=- -y --no-pause --no-restart-on-unexpected --install-fonts --verify-log-full --no-headless --binary=/home/test/build/firefox/firefox firefox


[taskcluster 2026-01-07 13:57:05.766Z] Task ID: ApTADkSpRymgf4FoIKbiiw
[taskcluster 2026-01-07 13:57:05.766Z] Worker ID: 5726642854197188845
[taskcluster 2026-01-07 13:57:05.766Z] Worker Group: us-central1-c
[taskcluster 2026-01-07 13:57:05.766Z] Worker Node Type: projects/757942385826/machineTypes/n2-standard-4
[taskcluster 2026-01-07 13:57:05.766Z] Worker Pool: proj-wpt/ci
[taskcluster 2026-01-07 13:57:05.766Z] Worker Version: 46.1.0
[taskcluster 2026-01-07 13:57:05.766Z] Public IP: 34.72.112.161
[taskcluster 2026-01-07 13:57:05.766Z] Hostname: proj-wpt-ci-wktwquvvq7o5k4juwp27jg

ac811f28856d - Started downloading
8f84a9f2102e - Started downloading
40516d781e70 - Started downloading
44ebbf800033 - Started downloading
44ebbf800033 - Downloaded in 0.046 seconds
8f84a9f2102e - Downloaded in 0.226 seconds
4f4fb700ef54 - Started downloading
a8884b21e40e - Started downloading
4f4fb700ef54 - Downloaded in 0.001 seconds
79c347416ee8 - Started downloading
79c347416ee8 - Downloaded in 0.082 seconds

...(675 lines hidden)...

 0:53.62 INFO STDOUT:         )
 0:53.62 INFO STDOUT:     
 0:53.62 INFO STDOUT:         assert await get_current_geolocation(context_in_user_context_1) == TEST_COORDINATES
 0:53.62 INFO STDOUT:     
 0:53.62 INFO STDOUT:         another_geolocation_coordinates = {"latitude": 30, "longitude": 20, "accuracy": 3}
 0:53.62 INFO STDOUT:     
 0:53.62 INFO STDOUT:         # Apply geolocation override to the user context.
 0:53.62 INFO STDOUT:         await bidi_session.emulation.set_geolocation_override(
 0:53.62 INFO STDOUT:             user_contexts=[user_context],
 0:53.62 INFO STDOUT:             coordinates=CoordinatesOptions(
 0:53.62 INFO STDOUT:                 latitude=another_geolocation_coordinates["latitude"],
 0:53.62 INFO STDOUT:                 longitude=another_geolocation_coordinates["longitude"],
 0:53.62 INFO STDOUT:                 accuracy=another_geolocation_coordinates["accuracy"],
 0:53.62 INFO STDOUT:             ),
 0:53.62 INFO STDOUT:         )
 0:53.62 INFO STDOUT:     
 0:53.62 INFO STDOUT:         # Make sure that context has still the context geolocation override.
 0:53.62 INFO STDOUT: >       assert await get_current_geolocation(context_in_user_context_1) == TEST_COORDINATES
 0:53.62 INFO STDOUT: E       AssertionError: assert {'latitude': 30, 'longitude': 20, 'accuracy': 3} == {'latitude': 10, 'longitude': 15, 'accuracy': 0.5}
 0:53.62 INFO STDOUT: E         
 0:53.62 INFO STDOUT: E         Differing items:
 0:53.62 INFO STDOUT: E         {'longitude': 20} != {'longitude': 15}
 0:53.62 INFO STDOUT: E         {'accuracy': 3} != {'accuracy': 0.5}
 0:53.62 INFO STDOUT: E         {'latitude': 30} != {'latitude': 10}
 0:53.62 INFO STDOUT: E         
 0:53.62 INFO STDOUT: E         Full diff:
 0:53.62 INFO STDOUT: E           {
 0:53.62 INFO STDOUT: E         -     'accuracy': 0.5,
 0:53.62 INFO STDOUT: E         ?                 ^^^
 0:53.62 INFO STDOUT: E         +     'accuracy': 3,
 0:53.62 INFO STDOUT: E         ?                 ^
 0:53.62 INFO STDOUT: E         -     'latitude': 10,
 0:53.62 INFO STDOUT: E         ?                 ^
 0:53.62 INFO STDOUT: E         +     'latitude': 30,
 0:53.62 INFO STDOUT: E         ?                 ^
 0:53.62 INFO STDOUT: E         -     'longitude': 15,
 0:53.62 INFO STDOUT: E         ?                  ^^
 0:53.62 INFO STDOUT: E         +     'longitude': 20,
 0:53.62 INFO STDOUT: E         ?                  ^^
 0:53.62 INFO STDOUT: E           }
 0:53.62 INFO STDOUT: another_geolocation_coordinates = {'accuracy': 3, 'latitude': 30, 'longitude': 20}
 0:53.62 INFO STDOUT: bidi_session = <webdriver.bidi.client.BidiSession object at 0x7fb9354d94e0>
 0:53.62 INFO STDOUT: context_in_user_context_1 = {'context': '6cfe2452-2428-4b7f-910f-7f6916488a51'}
 0:53.62 INFO STDOUT: create_user_context = <function create_user_context.<locals>.create_user_context at 0x7fb9354367a0>
 0:53.62 INFO STDOUT: default_coordinates = {'accuracy': 42, 'latitude': 37.41857, 'longitude': -122.08769}
 0:53.62 INFO STDOUT: get_current_geolocation = <function get_current_geolocation.<locals>.get_current_geolocation at 0x7fb935437d00>
 0:53.62 INFO STDOUT: set_geolocation_permission = <function set_geolocation_permission.<locals>.set_geolocation_permission at 0x7fb9354379a0>
 0:53.62 INFO STDOUT: test_url   = 'https://web-platform.test:8443/common/blank.html'
 0:53.62 INFO STDOUT: url        = <function url.<locals>.url at 0x7fb9354372e0>
 0:53.62 INFO STDOUT: user_context = 'f03212bb-d78a-4c80-bda4-af14fb783c49'
 0:53.62 INFO STDOUT: webdriver/tests/bidi/emulation/set_geolocation_override/user_contexts.py
 0:53.62 INFO STDOUT: :320: AssertionError
 0:53.62 INFO STDOUT: =========================== short test summary info ============================
 0:53.62 INFO STDOUT: FAILED webdriver/tests/bidi/emulation/set_geolocation_override/user_contexts.py::test_set_to_context_and_then_to_user_context - AssertionError: assert {'latitude': 30, 'longitude': 20, 'accuracy': 3} == {'latitude': 10, 'longitude': 15, 'accuracy': 0.5}
  
  Differing items:
  {'longitude': 20} != {'longitude': 15}
  {'accuracy': 3} != {'accuracy': 0.5}
  {'latitude': 30} != {'latitude': 10}
  
  Full diff:
    {
  -     'accuracy': 0.5,
  ?                 ^^^
  +     'accuracy': 3,
  ?                 ^
  -     'latitude': 10,
  ?                 ^
  +     'latitude': 30,
  ?                 ^
  -     'longitude': 15,
  ?                  ^^
  +     'longitude': 20,
  ?                  ^^
    }
 0:53.62 INFO STDOUT: ========================= 1 failed, 4 passed in 8.97s ==========================
 0:53.62 INFO Closing logging queue
 0:53.62 INFO queue closed
 0:53.72 SUITE_END

web-platform-test
~~~~~~~~~~~~~~~~~
Ran 6 checks (5 subtests, 1 tests)
Expected results: 5
Unexpected results: 1
  subtest: 1 (1 fail)

Unexpected Results
------------------
/webdriver/tests/bidi/emulation/set_geolocation_override/user_contexts.py
  FAIL test_set_to_context_and_then_to_user_context - AssertionError: assert {'latitude': 30, 'longitude': 20, 'accuracy': 3} == {'latitude': 10, 'longitude': 15, 'accuracy': 0.5}
bidi_session = <webdriver.bidi.client.BidiSession object at 0x7fb9354d94e0>
create_user_context = <function create_user_context.<locals>.create_user_context at 0x7fb9354367a0>
url = <function url.<locals>.url at 0x7fb9354372e0>
get_current_geolocation = <function get_current_geolocation.<locals>.get_current_geolocation at 0x7fb935437d00>
set_geolocation_permission = <function set_geolocation_permission.<locals>.set_geolocation_permission at 0x7fb9354379a0>

    async def test_set_to_context_and_then_to_user_context(
        bidi_session,
        create_user_context,
        url,
        get_current_geolocation,
        set_geolocation_permission,
    ):
    
        user_context = await create_user_context()
        context_in_user_context_1 = await bidi_session.browsing_context.create(
            user_context=user_context, type_hint="tab"
        )
    
        test_url = url("/common/blank.html")
        await bidi_session.browsing_context.navigate(
            context=context_in_user_context_1["context"],
            url=test_url,
            wait="complete",
        )
        await set_geolocation_permission(context_in_user_context_1, user_context)
        default_coordinates = await get_current_geolocation(context_in_user_context_1)
    
        # Apply geolocation override to the context.
        await bidi_session.emulation.set_geolocation_override(
            contexts=[context_in_user_context_1["context"]],
            coordinates=CoordinatesOptions(
                latitude=TEST_COORDINATES["latitude"],
                longitude=TEST_COORDINATES["longitude"],
                accuracy=TEST_COORDINATES["accuracy"],
            ),
        )
    
        assert await get_current_geolocation(context_in_user_context_1) == TEST_COORDINATES
    
        another_geolocation_coordinates = {"latitude": 30, "longitude": 20, "accuracy": 3}
    
        # Apply geolocation override to the user context.
        await bidi_session.emulation.set_geolocation_override(
            user_contexts=[user_context],
            coordinates=CoordinatesOptions(
                latitude=another_geolocation_coordinates["latitude"],
                longitude=another_geolocation_coordinates["longitude"],
                accuracy=another_geolocation_coordinates["accuracy"],
            ),
        )
    
        # Make sure that context has still the context geolocation override.
>       assert await get_current_geolocation(context_in_user_context_1) == TEST_COORDINATES
E       AssertionError: assert {'latitude': 30, 'longitude': 20, 'accuracy': 3} == {'latitude': 10, 'longitude': 15, 'accuracy': 0.5}
E         
E         Differing items:
E         {'longitude': 20} != {'longitude': 15}
E         {'accuracy': 3} != {'accuracy': 0.5}
E         {'latitude': 30} != {'latitude': 10}
E         
E         Full diff:
E           {
E         -     'accuracy': 0.5,
E         ?                 ^^^
E         +     'accuracy': 3,
E         ?                 ^
E         -     'latitude': 10,
E         ?                 ^
E         +     'latitude': 30,
E         ?                 ^
E         -     'longitude': 15,
E         ?                  ^^
E         +     'longitude': 20,
E         ?                  ^^
E           }

another_geolocation_coordinates = {'accuracy': 3, 'latitude': 30, 'longitude': 20}
bidi_session = <webdriver.bidi.client.BidiSession object at 0x7fb9354d94e0>
context_in_user_context_1 = {'context': '6cfe2452-2428-4b7f-910f-7f6916488a51'}
create_user_context = <function create_user_context.<locals>.create_user_context at 0x7fb9354367a0>
default_coordinates = {'accuracy': 42, 'latitude': 37.41857, 'longitude': -122.08769}
get_current_geolocation = <function get_current_geolocation.<locals>.get_current_geolocation at 0x7fb935437d00>
set_geolocation_permission = <function set_geolocation_permission.<locals>.set_geolocation_permission at 0x7fb9354379a0>
test_url   = 'https://web-platform.test:8443/common/blank.html'
url        = <function url.<locals>.url at 0x7fb9354372e0>
user_context = 'f03212bb-d78a-4c80-bda4-af14fb783c49'

webdriver/tests/bidi/emulation/set_geolocation_override/user_contexts.py:320: AssertionError
 0:53.72 INFO Got 1 unexpected results, with 0 unexpected passes
 0:53.72 wptserve INFO Stopped http server on 127.0.0.1:8000
 0:53.72 wptserve INFO Stopped http server on 127.0.0.1:8001
 0:53.72 wptserve INFO Stopped http server on 127.0.0.1:8003
 0:53.73 wptserve INFO Stopped http server on 127.0.0.1:8002
 0:53.73 wptserve INFO Stopped http server on 127.0.0.1:8443
 0:53.73 wptserve INFO Stopped http server on 127.0.0.1:8444
 0:53.73 wptserve INFO Stopped http server on 127.0.0.1:8445
 0:53.73 wptserve INFO Stopped http server on 127.0.0.1:8446
 0:53.73 wptserve INFO Stopped http server on 127.0.0.1:9000
 0:53.74 wptserve INFO Stopped WebTransport over HTTP/3 server on 127.0.0.1:11000
 0:54.18 wptserve INFO Close on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8888))
 0:54.18 wptserve INFO Close on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8889))
 0:54.25 INFO Removed font: Ahem.ttf
 0:54.28 INFO Closing logging queue
 0:54.28 INFO queue closed
 0:54.28 INFO Tolerating 1 unexpected results
[taskcluster 2026-01-07 14:00:31.077Z] === Task Finished ===
[taskcluster 2026-01-07 14:00:32.109Z] Successful task run with exit code: 0 completed in 206.346 seconds