-
Notifications
You must be signed in to change notification settings - Fork 375
Override "Accept-Language" header if WebDriver BiDi emulated language is present. #1869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fcf976a to
61a4217
Compare
|
@sadym-chromium, could you create an issue for it on your side? |
Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
|
|
Hey, @annevk, could you maybe take another look? 🙏🏻 |
annevk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good modulo some minor grammar and wrapping nits.
Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
|
I hadn't looked at https://w3c.github.io/webdriver-bidi/#webdriver-bidi-emulated-language before but it appears that returns null or a string and we need a byte sequence here. So you need to encode the return value. |
7a4cf8f to
f861fd2
Compare
Ah, right, updated ✅ |
fetch.bs
Outdated
| <var>request</var>'s <a for=request>client</a>. | ||
|
|
||
| <li><p>If <var>emulatedLanguage</var> is non-null, then <a for="header list">append</a> | ||
| (`<code>Accept-Language</code>, <var>emulatedLanguage</var>, <a>isomorphic encoded</a>) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a ` missing. I also find this confusing as this could also be read as a three-tuple.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I've added "`". And moved encoding into a separate step to avoid having the three-tuple situation.
0985169 to
feeb5d9
Compare
|
Thanks @lutien! |
emulation.setLocaleOverrideinnavigator.languageandAccept-LanguageGoogleChromeLabs/chromium-bidi#3863(See WHATWG Working Mode: Changes for more details.)
Preview | Diff