BrowserUI updates can override emulated device viewport in default (non-headless) mode
Reported by
killiank...@gmail.com,
Nov 16
|
||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Steps to reproduce the problem: 1. Launch chrome using puppeteer and no default viewport 2. Navigate to https://www.google.com via CDP 3. Send Emulation.setDeviceMetricsOverride 4. Navigate to https://www.youtube.com via CDP 5. Take screenshot via CDP The screenshot size will match the window size, not the emulated viewport The following gist will reproduce the issue using puppeteer: https://gist.github.com/kkoenig/23a121e645b9cdcd7954ab802e1fcd59 What is the expected behavior? The screenshot size should match the emulated viewport size What went wrong? It looks like the emulated viewport is overriden duing a call to Browser::ProcessPendingUIUpdates after navigating to the second page. I can confirm this by re-running the test with '--diable-infobars' and observing the issue go away, although from looking through the code it does not look specifically related to infobars. Did this work before? N/A Chrome version: 70.0.3538.102 Channel: stable OS Version: Ubuntu 18.04.1 LTS Flash Version: This is affecting our automated tests which require non-headless mode.
,
Nov 18
,
Nov 18
Issue 905926 has been merged into this issue.
,
Nov 18
Based on some time stepping through the code it looks like 905926 may have a different root cause
,
Nov 20
|
||
►
Sign in to add a comment |
||
Comment 1 by krajshree@chromium.org
, Nov 18