Skip to content

Commit

Permalink
Add more emulated Android phones
Browse files Browse the repository at this point in the history
Adds:

Galaxy S8
Galaxy S9+
Galaxy Tab S4
Pixel 3
Pixel 4

These devices are regarded as worthy of targeting by https://www.browserstack.com/test-on-the-right-mobile-devices

Sources (both have identical data for these 5 devices):

1. https://github.com/aerokube/moon-deploy/blob/master/moon-local.yaml#L199
2. https://www.danhendricks.com/2018/04/adding-iphone-galaxy-chrome-mobile-emulated-devices/#heading_device_data

The same changes (structured differently) have been added to Playwright ( microsoft/playwright#6413 ).

This PR was suggested by @mathiasbynens, see puppeteer/puppeteer#7210

Change-Id: I70db28b15b77fcdb82171a08ebd0b33aa0886621
Bug: None
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2919612
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Peter Müller <petermueller@chromium.org>
Reviewed-by: Mraz Marian <mraz@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
  • Loading branch information
jschfflr authored and Devtools-frontend LUCI CQ committed Sep 11, 2021
1 parent 6929ee0 commit 4cf1ca9
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Expand Up @@ -34,6 +34,7 @@ Karntino Areros <karntino.c.areros@gmail.com>
Krishnal Ciccolella <ciccolella.krishnal@gmail.com>
Luke Swiderski <luke.swiderski@gmail.com>
Michael Brüning <michael.bruning@qt.io>
Michael Rienstra <mrienstra@gmail.com>
Per-Olov Jernberg <possan@possan.se>
PhistucK <phistuck@gmail.com>
Pradhuman Singh Baid <pradhumansinghbaid@gmail.com>
Expand Down
75 changes: 75 additions & 0 deletions front_end/models/emulation/EmulatedDevices.ts
Expand Up @@ -1041,6 +1041,36 @@ const emulatedDevices = [
{'platform': 'Android', 'platformVersion': '8.0.0', 'architecture': '', 'model': 'Pixel 2 XL', 'mobile': true},
'type': 'phone',
},
{
'show-by-default': false,
'title': 'Pixel 3',
'screen': {
'horizontal': {'width': 786, 'height': 393},
'device-pixel-ratio': 2.75,
'vertical': {'width': 393, 'height': 786},
},
'capabilities': ['touch', 'mobile'],
'user-agent':
'Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.158 Mobile Safari/537.36',
'user-agent-metadata':
{'platform': 'Android', 'platformVersion': '9', 'architecture': '', 'model': 'Pixel 3', 'mobile': true},
'type': 'phone',
},
{
'show-by-default': false,
'title': 'Pixel 4',
'screen': {
'horizontal': {'width': 745, 'height': 353},
'device-pixel-ratio': 3,
'vertical': {'width': 353, 'height': 745},
},
'capabilities': ['touch', 'mobile'],
'user-agent':
'Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36',
'user-agent-metadata':
{'platform': 'Android', 'platformVersion': '10', 'architecture': '', 'model': 'Pixel 4', 'mobile': true},
'type': 'phone',
},
{
'show-by-default': false,
'title': 'LG Optimus L70',
Expand Down Expand Up @@ -1139,6 +1169,51 @@ const emulatedDevices = [
{'platform': 'Android', 'platformVersion': '5.0', 'architecture': '', 'model': 'SM-G900P', 'mobile': true},
'type': 'phone',
},
{
'show-by-default': false,
'title': 'Galaxy S8',
'screen': {
'horizontal': {'width': 740, 'height': 360},
'device-pixel-ratio': 3,
'vertical': {'width': 360, 'height': 740},
},
'capabilities': ['touch', 'mobile'],
'user-agent':
'Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36',
'user-agent-metadata':
{'platform': 'Android', 'platformVersion': '7.0', 'architecture': '', 'model': 'SM-G950U', 'mobile': true},
'type': 'phone',
},
{
'show-by-default': false,
'title': 'Galaxy S9+',
'screen': {
'horizontal': {'width': 658, 'height': 320},
'device-pixel-ratio': 4.5,
'vertical': {'width': 320, 'height': 658},
},
'capabilities': ['touch', 'mobile'],
'user-agent':
'Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.111 Mobile Safari/537.36',
'user-agent-metadata':
{'platform': 'Android', 'platformVersion': '8.0.0', 'architecture': '', 'model': 'SM-G965U', 'mobile': true},
'type': 'phone',
},
{
'show-by-default': false,
'title': 'Galaxy Tab S4',
'screen': {
'horizontal': {'width': 1138, 'height': 712},
'device-pixel-ratio': 2.25,
'vertical': {'width': 712, 'height': 1138},
},
'capabilities': ['touch', 'mobile'],
'user-agent':
'Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.80 Safari/537.36',
'user-agent-metadata':
{'platform': 'Android', 'platformVersion': '8.1.0', 'architecture': '', 'model': 'SM-T837A', 'mobile': true},
'type': 'phone',
},
{
'order': 1,
'show-by-default': false,
Expand Down

0 comments on commit 4cf1ca9

Please sign in to comment.