Open Bug 1938048 Opened 1 year ago Updated 4 months ago

[meta] Support "emulation.setLocaleOverride" command

Categories

(Remote Protocol :: WebDriver BiDi, task)

task

Tracking

(Not tracked)

People

(Reporter: Sasha, Unassigned)

References

(Depends on 3 open bugs, Blocks 2 open bugs, )

Details

(Keywords: meta)

Attachments

(1 obsolete file)

This is a requirement for Puppeteer, Playwright and other clients.
The specification work has not started, and the discussion is happening over at https://github.com/w3c/webdriver-bidi/issues/774.

The goal is to add a new command to emulate locale, but it's not clear yet what should be the exact behavior and in which module this command should be created.

Note, this is one of the features which is being patched manually by Playwright (juggler) at https://github.com/microsoft/playwright/blob/main/browser_patches/firefox/patches/bootstrap.diff#L490.

Depends on: 1968951
Summary: [meta] Support command to emulate locale → [meta] Support "emulation.setLocaleOverride" command
Depends on: 1968952
Blocks: 1917540
Depends on: 1978533
Depends on: 1980211
See Also: → 1979026
Depends on: 1983807
Depends on: 1988725
Depends on: 1994396
Depends on: 1995691
Depends on: 1996547
Depends on: 1997556
Depends on: 2015655
Depends on: 2040904
Depends on: 2052932

Bug 1995691 made emulation.setLocaleOverride override the Accept-Language request header, but only for document-initiated requests.
Bug 2015655 made the locale override apply to the JS realm and navigator.language in Worker and SharedWorker but it did not touch the Accept-Language header or WebSocket path.

HttpBaseChannel::Init builds Accept-Language from mLoadInfo->GetBrowsingContext()->Top()->GetLanguageOverride().
For Worker requests GetBrowsingContext() is null, and the code never consults GetAssociatedBrowsingContext(), which fetch() already populates on the channel's LoadInfo.

Worker WebSocket handshakes are additionally missing that association as the channel's LoadInfo never gets associatedBrowsingContextID set at all.

Assignee: nobody → hi
Status: NEW → ASSIGNED

Devin, this is a meta bug that we are not using for patches. Note that there is actually bug 2052932 for exactly the purpose of your patch. Can you please move the patch to the other bug? Thanks.

Flags: needinfo?(hi)

oh whoops sorry that was a bad copypasta on my part 😅

Flags: needinfo?(hi)
Attachment #9604831 - Attachment is obsolete: true
Assignee: hi → nobody
Status: ASSIGNED → NEW
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: