Skip to content

[WebDriver BiDi] script.realmCreated worker tests expect a script URL instead of a serialized origin #63009

Open

Description

@sergedeh

The WebDriver BiDi script.realmCreated worker tests compare RealmInfo.origin with worker_url.

The inline() fixture returns a complete script URL containing a path and query string. However, the WebDriver BiDi specification defines RealmInfo.origin as the serialization of the worker environment settings object's origin.

For example, for a worker loaded from:
https://example.test/path/worker.js?x=1

the expected origin is:
https://example.test

not the complete worker script URL.

Affected tests

The incorrect comparison appears in:

  • test_dedicated_worker
  • test_shared_worker
  • test_service_worker
  • test_dedicated_worker_subscribe_to_one_context
  • test_dedicated_worker_subscribe_to_user_context

Source:
https://github.com/web-platform-tests/wpt/blob/1e91be47ac599571cde8a98b0a11cafc3a9e281c/webdriver/tests/bidi/script/realm_created/realm_created.py

Specification:
https://github.com/w3c/webdriver-bidi/blob/318aec70256ca812c1db801665a2b8291691bf31/index.bs#L12230-L12282

Expected result

The tests should compare origin with the serialized origin derived from
worker_url, for example using the existing get_origin_from_url helper.
The existing realm type, identifier, and owner checks should remain unchanged.

Context

This was exposed while implementing dedicated-worker realm support in WebKit:
WebKit/WebKit#73149

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions