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
Useragentdata support #7378
Useragentdata support #7378
Conversation
Adds userAgentData to setUserAgent that supports specifying user agent data for the new navigator.userAgentData and Client Hints headers.
Thanks for kicking this off, Rowan! Jan and Alex, could you PTAL? |
Not sure about |
To fix the |
Will test this! |
Corrected documentation and tests for navigator.userAgentData Fixes puppeteer#7269
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.
LGTM thanks!
Tests don't work, fixing. |
For the failing test you can use |
Correct checking of navigator.userAgentData values
Tests should now be passing. |
It seems like firefox doesn't support this yet - you can exclude this test from being run on FF by using |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
@googlebot I consent. |
@rowan-m I updated the tests to pass but could you include the requested example that Mathias requested? |
Corrected documentation and tests for navigator.userAgentData Fixes puppeteer#7269
Context: #7269
Review requests
npm run doc
complains about[MarkDown] Method Page.setUserAgent() userAgentData Object != UserAgentMetadata
. Not really clear how to resolve. Other methods that are using a DevTools protocol type are also just referrring toObject
.Adds userAgentData to setUserAgent that supports specifying user agent
data for the new navigator.userAgentData and Client Hints headers.