Skip to content

[wdspec] Add a test for "emulation.setScreenOrientationOverride" comm…

eed79f0
Select commit
Loading
Failed to load commit list.
Merged

[Gecko Bug 1998734] [wdspec] Add a test for "emulation.setScreenOrientationOverride" command to set an override to a browsing context and then to a user context. #57041

[wdspec] Add a test for "emulation.setScreenOrientationOverride" comm…
eed79f0
Select commit
Loading
Failed to load commit list.
Community-TC Integration / wpt-chrome-dev-results-without-changes succeeded Jan 7, 2026 in 3m 59s

Community-TC (pull_request)

Collect results for all tests affected by a pull request in chrome but without the changes in the PR.

Details

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

Task Status

Started: 2026-01-07T13:55:05.274Z
Resolved: 2026-01-07T13:58:08.320Z
Task Execution Time: 3 minutes, 3 seconds, 46 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=dev --no-fail-on-unexpected --log-wptreport=../artifacts/wpt_report.json --log-wptscreenshot=../artifacts/wpt_screenshot.txt --affected task_head --log-mach-level=info --log-mach=- -y --no-pause --no-restart-on-unexpected --install-fonts --verify-log-full --no-headless --enable-swiftshader --install-browser --install-webdriver chrome


[taskcluster 2026-01-07 13:55:05.423Z] Task ID: VY927P4LSiegOtSUno8rbg
[taskcluster 2026-01-07 13:55:05.424Z] Worker ID: 6545658998324190054
[taskcluster 2026-01-07 13:55:05.424Z] Worker Group: us-east1-d
[taskcluster 2026-01-07 13:55:05.424Z] Worker Node Type: projects/757942385826/machineTypes/n2-standard-4
[taskcluster 2026-01-07 13:55:05.424Z] Worker Pool: proj-wpt/ci
[taskcluster 2026-01-07 13:55:05.424Z] Worker Version: 46.1.0
[taskcluster 2026-01-07 13:55:05.424Z] Public IP: 34.148.14.248
[taskcluster 2026-01-07 13:55:05.424Z] Hostname: proj-wpt-ci-uwzqt3hqra-4hprl61uu8a

ac811f28856d - Started downloading
ac811f28856d - Downloaded in 0.036 seconds
8f84a9f2102e - Started downloading
40516d781e70 - Started downloading
44ebbf800033 - Started downloading
44ebbf800033 - Downloaded in 0.051 seconds
8f84a9f2102e - Downloaded in 0.213 seconds
a8884b21e40e - Started downloading
4f4fb700ef54 - Started downloading
4f4fb700ef54 - Downloaded in 0.003 seconds
79c347416ee8 - Started downloading

...(728 lines hidden)...

 0:31.57 INFO STDOUT:         # Create a new context in the user context.
 0:31.57 INFO STDOUT:         context_in_user_context_2 = await bidi_session.browsing_context.create(
 0:31.57 INFO STDOUT:             user_context=user_context, type_hint="tab"
 0:31.57 INFO STDOUT:         )
 0:31.57 INFO STDOUT:         # Make sure that the screen orientation override for the user context is
 0:31.57 INFO STDOUT:         # applied.
 0:31.57 INFO STDOUT:         assert await get_screen_orientation(
 0:31.57 INFO STDOUT:             context_in_user_context_2) == some_web_screen_orientation
 0:31.57 INFO STDOUT:     
 0:31.57 INFO STDOUT:         await bidi_session.emulation.set_screen_orientation_override(
 0:31.57 INFO STDOUT:             contexts=[context_in_user_context_1["context"]],
 0:31.57 INFO STDOUT:             screen_orientation=None,
 0:31.57 INFO STDOUT:         )
 0:31.57 INFO STDOUT:     
 0:31.57 INFO STDOUT:         # Make sure that the screen orientation override was reset.
 0:31.57 INFO STDOUT: >       assert await get_screen_orientation(
 0:31.57 INFO STDOUT:             context_in_user_context_1) == default_screen_orientation
 0:31.57 INFO STDOUT: E       AssertionError: assert {'angle': 90, 'type': 'portrait-primary'} == {'angle': 0, 'type': 'landscape-primary'}
 0:31.57 INFO STDOUT: E         
 0:31.57 INFO STDOUT: E         Differing items:
 0:31.57 INFO STDOUT: E         {'type': 'portrait-primary'} != {'type': 'landscape-primary'}
 0:31.57 INFO STDOUT: E         {'angle': 90} != {'angle': 0}
 0:31.57 INFO STDOUT: E         
 0:31.57 INFO STDOUT: E         Full diff:
 0:31.57 INFO STDOUT: E           {
 0:31.57 INFO STDOUT: E         -     'angle': 0,
 0:31.57 INFO STDOUT: E         +     'angle': 90,
 0:31.57 INFO STDOUT: E         ?              +
 0:31.57 INFO STDOUT: E         -     'type': 'landscape-primary',
 0:31.57 INFO STDOUT: E         ?              ^ ^^^^^^^
 0:31.57 INFO STDOUT: E         +     'type': 'portrait-primary',
 0:31.57 INFO STDOUT: E         ?              ^^^^^ ^^
 0:31.57 INFO STDOUT: E           }
 0:31.57 INFO STDOUT: another_bidi_screen_orientation = {'natural': 'landscape', 'type': 'portrait-secondary'}
 0:31.57 INFO STDOUT: another_web_screen_orientation = {'angle': 270, 'type': 'portrait-secondary'}
 0:31.57 INFO STDOUT: bidi_session = <webdriver.bidi.client.BidiSession object at 0x7ff0adb27d90>
 0:31.57 INFO STDOUT: context_in_user_context_1 = {'context': 'C9CE6C580C521866A2FD65195EFB1A0E'}
 0:31.57 INFO STDOUT: context_in_user_context_2 = {'context': '62E834FED73CE817612A46CABBE86852'}
 0:31.57 INFO STDOUT: create_user_context = <function create_user_context.<locals>.create_user_context at 0x7ff0ad2e7ac0>
 0:31.57 INFO STDOUT: default_screen_orientation = {'angle': 0, 'type': 'landscape-primary'}
 0:31.57 INFO STDOUT: get_screen_orientation = <function get_screen_orientation.<locals>.get_screen_orientation at 0x7ff0ad2e7d00>
 0:31.57 INFO STDOUT: new_tab    = {'children': None,
 'clientWindow': '124077113',
 'context': '35F980F83D3CCA134E834D1D7785DF0B',
 'originalOpener': None,
 'parent': None,
 'url': 'about:blank',
 'userContext': 'default'}
 0:31.57 INFO STDOUT: some_bidi_screen_orientation = {'natural': 'landscape', 'type': 'portrait-primary'}
 0:31.57 INFO STDOUT: some_web_screen_orientation = {'angle': 90, 'type': 'portrait-primary'}
 0:31.57 INFO STDOUT: user_context = '671C0358D317D8B7D25BDC9B4C09F71D'
 0:31.57 INFO STDOUT: webdriver/tests/bidi/emulation/set_screen_orientation_override/user_contexts.py
 0:31.57 INFO STDOUT: :148: AssertionError
 0:31.57 INFO STDOUT: =========================== short test summary info ============================
 0:31.57 INFO STDOUT: FAILED webdriver/tests/bidi/emulation/set_screen_orientation_override/user_contexts.py::test_set_to_user_context_and_then_to_context - AssertionError: assert {'angle': 90, 'type': 'portrait-primary'} == {'angle': 0, 'type': 'landscape-primary'}
  
  Differing items:
  {'type': 'portrait-primary'} != {'type': 'landscape-primary'}
  {'angle': 90} != {'angle': 0}
  
  Full diff:
    {
  -     'angle': 0,
  +     'angle': 90,
  ?              +
  -     'type': 'landscape-primary',
  ?              ^ ^^^^^^^
  +     'type': 'portrait-primary',
  ?              ^^^^^ ^^
    }
 0:31.57 INFO STDOUT: ========================= 1 failed, 3 passed in 3.72s ==========================
 0:31.58 INFO Closing logging queue
 0:31.58 INFO queue closed
 0:31.67 SUITE_END

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

Unexpected Results
------------------
/webdriver/tests/bidi/emulation/set_screen_orientation_override/user_contexts.py
  FAIL test_set_to_user_context_and_then_to_context - AssertionError: assert {'angle': 90, 'type': 'portrait-primary'} == {'angle': 0, 'type': 'landscape-primary'}
bidi_session = <webdriver.bidi.client.BidiSession object at 0x7ff0adb27d90>
create_user_context = <function create_user_context.<locals>.create_user_context at 0x7ff0ad2e7ac0>
new_tab = {'children': None, 'clientWindow': '124077113', 'context': '35F980F83D3CCA134E834D1D7785DF0B', 'originalOpener': None, ...}
get_screen_orientation = <function get_screen_orientation.<locals>.get_screen_orientation at 0x7ff0ad2e7d00>
some_bidi_screen_orientation = {'natural': 'landscape', 'type': 'portrait-primary'}
some_web_screen_orientation = {'angle': 90, 'type': 'portrait-primary'}
another_bidi_screen_orientation = {'natural': 'landscape', 'type': 'portrait-secondary'}
another_web_screen_orientation = {'angle': 270, 'type': 'portrait-secondary'}
default_screen_orientation = {'angle': 0, 'type': 'landscape-primary'}

    async def test_set_to_user_context_and_then_to_context(bidi_session,
            create_user_context, new_tab, get_screen_orientation,
            some_bidi_screen_orientation, some_web_screen_orientation,
            another_bidi_screen_orientation, another_web_screen_orientation,
            default_screen_orientation):
        user_context = await create_user_context()
        context_in_user_context_1 = await bidi_session.browsing_context.create(
            user_context=user_context, type_hint="tab"
        )
    
        # Apply screen orientation override to the user context.
        await bidi_session.emulation.set_screen_orientation_override(
            user_contexts=[user_context],
            screen_orientation=some_bidi_screen_orientation)
    
        # Apply screen orientation override now only to the context.
        await bidi_session.emulation.set_screen_orientation_override(
            contexts=[context_in_user_context_1["context"]],
            screen_orientation=another_bidi_screen_orientation)
        assert await get_screen_orientation(
            context_in_user_context_1) == another_web_screen_orientation
    
        await bidi_session.browsing_context.reload(
            context=context_in_user_context_1["context"], wait="complete"
        )
    
        # Make sure that after reload the screen orientation is still updated.
        assert await get_screen_orientation(
            context_in_user_context_1) == another_web_screen_orientation
    
        # Create a new context in the user context.
        context_in_user_context_2 = await bidi_session.browsing_context.create(
            user_context=user_context, type_hint="tab"
        )
        # Make sure that the screen orientation override for the user context is
        # applied.
        assert await get_screen_orientation(
            context_in_user_context_2) == some_web_screen_orientation
    
        await bidi_session.emulation.set_screen_orientation_override(
            contexts=[context_in_user_context_1["context"]],
            screen_orientation=None,
        )
    
        # Make sure that the screen orientation override was reset.
>       assert await get_screen_orientation(
            context_in_user_context_1) == default_screen_orientation
E       AssertionError: assert {'angle': 90, 'type': 'portrait-primary'} == {'angle': 0, 'type': 'landscape-primary'}
E         
E         Differing items:
E         {'type': 'portrait-primary'} != {'type': 'landscape-primary'}
E         {'angle': 90} != {'angle': 0}
E         
E         Full diff:
E           {
E         -     'angle': 0,
E         +     'angle': 90,
E         ?              +
E         -     'type': 'landscape-primary',
E         ?              ^ ^^^^^^^
E         +     'type': 'portrait-primary',
E         ?              ^^^^^ ^^
E           }

another_bidi_screen_orientation = {'natural': 'landscape', 'type': 'portrait-secondary'}
another_web_screen_orientation = {'angle': 270, 'type': 'portrait-secondary'}
bidi_session = <webdriver.bidi.client.BidiSession object at 0x7ff0adb27d90>
context_in_user_context_1 = {'context': 'C9CE6C580C521866A2FD65195EFB1A0E'}
context_in_user_context_2 = {'context': '62E834FED73CE817612A46CABBE86852'}
create_user_context = <function create_user_context.<locals>.create_user_context at 0x7ff0ad2e7ac0>
default_screen_orientation = {'angle': 0, 'type': 'landscape-primary'}
get_screen_orientation = <function get_screen_orientation.<locals>.get_screen_orientation at 0x7ff0ad2e7d00>
new_tab    = {'children': None,
 'clientWindow': '124077113',
 'context': '35F980F83D3CCA134E834D1D7785DF0B',
 'originalOpener': None,
 'parent': None,
 'url': 'about:blank',
 'userContext': 'default'}
some_bidi_screen_orientation = {'natural': 'landscape', 'type': 'portrait-primary'}
some_web_screen_orientation = {'angle': 90, 'type': 'portrait-primary'}
user_context = '671C0358D317D8B7D25BDC9B4C09F71D'

webdriver/tests/bidi/emulation/set_screen_orientation_override/user_contexts.py:148: AssertionError
 0:31.67 INFO Got 1 unexpected results, with 0 unexpected passes
 0:31.67 wptserve INFO Stopped http server on 127.0.0.1:8000
 0:31.67 wptserve INFO Stopped http server on 127.0.0.1:8444
 0:31.67 wptserve INFO Stopped http server on 127.0.0.1:8443
 0:31.67 wptserve INFO Stopped http server on 127.0.0.1:8445
 0:31.67 wptserve INFO Stopped http server on 127.0.0.1:8003
 0:31.67 wptserve INFO Stopped http server on 127.0.0.1:8001
 0:31.67 wptserve INFO Stopped http server on 127.0.0.1:8002
 0:31.70 wptserve INFO Stopped http server on 127.0.0.1:8446
 0:31.70 wptserve INFO Stopped WebTransport over HTTP/3 server on 127.0.0.1:11000
 0:31.70 wptserve INFO Stopped http server on 127.0.0.1:9000
 0:32.18 wptserve INFO Close on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8888))
 0:32.18 wptserve INFO Close on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8889))
 0:32.22 INFO Removed font: Ahem.ttf
 0:32.24 INFO Closing logging queue
 0:32.24 INFO queue closed
 0:32.24 INFO Tolerating 1 unexpected results
[taskcluster 2026-01-07 13:58:06.530Z] === Task Finished ===
[taskcluster 2026-01-07 13:58:07.516Z] Successful task run with exit code: 0 completed in 182.095 seconds