New issue
Advanced search Search tips

Issue 905950 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

BrowserUI updates can override emulated device viewport in default (non-headless) mode

Reported by killiank...@gmail.com, Nov 16

Issue description

UserAgent: 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.
 
Labels: Needs-Triage-M70
Owner: dgozman@chromium.org
Status: Assigned (was: Unconfirmed)
Issue 905926 has been merged into this issue.
Based on some time stepping through the code it looks like 905926 may have a different root cause
Cc: dgozman@chromium.org
 Issue 907090  has been merged into this issue.

Sign in to add a comment