Repository navigation
fix(emulation): correctly emulate navigator.userAgentData.platform for device emulation - #41623
Raini (Git-Raini) wants to merge 1 commit into
Conversation
…r device emulation Emulated Client Hints (navigator.userAgentData) were only synced when a custom userAgent string matched one of the known OS patterns. When no custom userAgent was set, Chromium's own internal Client Hints computation was used unconditionally, which can disagree with the real host platform. Always sync userAgentMetadata, deriving the platform from the browser's actual host platform when no custom userAgent is provided. Fixes microsoft#39568
|
This overrides |
|
Thanks Yury Semikhatsky (@yury-s). I went back through the history here - PR #39723 implemented this, and #40016 reverted it - but I couldn't find a documented explanation of what actually broke (the revert PR has no description, and the CI failures visible on #39723 at the time look like unrelated flakes, not a clear regression signal). Rather than guess at a third variant of the same mechanism without knowing what specifically went wrong last time, could you point me to the actual regression (an issue, an internal report, or just a one-line description of what broke)? That would let me make sure a new attempt actually avoids it instead of re-treading the same ground. Leaving this closed for now until I have that context. |
Fixes #39568