[meta] Support "emulation.setLocaleOverride" command
Categories
(Remote Protocol :: WebDriver BiDi, 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.
| Reporter | ||
Updated•1 year ago
|
Updated•1 year ago
|
Comment 1•4 months ago
|
||
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.
Updated•4 months ago
|
Comment 2•4 months ago
|
||
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.
Updated•4 months ago
|
Updated•4 months ago
|
Description
•