-
Notifications
You must be signed in to change notification settings - Fork 3k
[WebDriver BiDi] emulate user-agent
string
#11576
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
Merged
annevk
merged 5 commits into
whatwg:main
from
sadym-chromium:sadym/emulation.setUserAgentOverride
Sep 17, 2025
Merged
[WebDriver BiDi] emulate user-agent
string
#11576
annevk
merged 5 commits into
whatwg:main
from
sadym-chromium:sadym/emulation.setUserAgentOverride
Sep 17, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sadym-chromium
added a commit
to w3c/webdriver-bidi
that referenced
this pull request
Sep 10, 2025
Specification for `emulation.setUserAgentOverride` command. * Introduce a new hook "WebDriver BiDi emulated User-Agent". * Fetch spec update required, as the default `User-Agent` headers is set BEFORE the "[WebDriver BiDi before request sent](https://w3c.github.io/webdriver-bidi/#webdriver-bidi-before-request-sent)" is invoked, so there is no way to distinguish between the user explicitly set the `User-Agent` vs the [default `User-Agent` value](https://fetch.spec.whatwg.org/#default-user-agent-value) was used. Use the hook in Fetch spec: whatwg/fetch#1851 * HTML spec update required to return the proper `User-Agent` as the result of the `navigator.userAgent`. Use the hook in HTML spec: whatwg/html#11576
# Conflicts: # source
ba6e334
to
426e4b3
Compare
noamr
reviewed
Sep 16, 2025
annevk
reviewed
Sep 16, 2025
annevk
reviewed
Sep 16, 2025
annevk
approved these changes
Sep 17, 2025
Thanks @sadym-chromium! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support for user-agent emulations. Required for WebDriver BiDi: https://www.w3.org/TR/webdriver-bidi/#command-emulation-setUserAgentOverride.
Rely on environment default
User-Agent
value to emulate user agent.emulation.setUserAgentOverride
command web-platform-tests/wpt#54810emulation.setUserAgentOverride
GoogleChromeLabs/chromium-bidi#3661(See WHATWG Working Mode: Changes for more details.)
/infrastructure.html ( diff )
/system-state.html ( diff )