Skip to content
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

feat: add more Android models to DeviceDescriptors #7210

Merged
merged 3 commits into from Sep 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
130 changes: 130 additions & 0 deletions src/common/DeviceDescriptors.ts
Expand Up @@ -187,6 +187,84 @@ const devices: Device[] = [
isLandscape: true,
},
},
{
name: 'Galaxy S8',
userAgent:
'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',
viewport: {
width: 360,
height: 740,
deviceScaleFactor: 3,
isMobile: true,
hasTouch: true,
isLandscape: false,
},
},
{
name: 'Galaxy S8 landscape',
userAgent:
'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',
viewport: {
width: 740,
height: 360,
deviceScaleFactor: 3,
isMobile: true,
hasTouch: true,
isLandscape: true,
},
},
{
name: 'Galaxy S9+',
userAgent:
'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',
viewport: {
width: 320,
height: 658,
deviceScaleFactor: 4.5,
isMobile: true,
hasTouch: true,
isLandscape: false,
},
},
{
name: 'Galaxy S9+ landscape',
userAgent:
'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',
viewport: {
width: 658,
height: 320,
deviceScaleFactor: 4.5,
isMobile: true,
hasTouch: true,
isLandscape: true,
},
},
{
name: 'Galaxy Tab S4',
userAgent:
'Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.80 Safari/537.36',
viewport: {
width: 712,
height: 1138,
deviceScaleFactor: 2.25,
isMobile: true,
hasTouch: true,
isLandscape: false,
},
},
{
name: 'Galaxy Tab S4 landscape',
userAgent:
'Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.80 Safari/537.36',
viewport: {
width: 1138,
height: 712,
deviceScaleFactor: 2.25,
isMobile: true,
hasTouch: true,
isLandscape: true,
},
},
{
name: 'iPad',
userAgent:
Expand Down Expand Up @@ -1032,6 +1110,58 @@ const devices: Device[] = [
isLandscape: true,
},
},
{
name: 'Pixel 3',
userAgent:
'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',
viewport: {
width: 393,
height: 786,
deviceScaleFactor: 2.75,
isMobile: true,
hasTouch: true,
isLandscape: false,
},
},
{
name: 'Pixel 3 landscape',
userAgent:
'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',
viewport: {
width: 786,
height: 393,
deviceScaleFactor: 2.75,
isMobile: true,
hasTouch: true,
isLandscape: true,
},
},
{
name: 'Pixel 4',
userAgent:
'Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36',
viewport: {
width: 353,
height: 745,
deviceScaleFactor: 3,
isMobile: true,
hasTouch: true,
isLandscape: false,
},
},
{
name: 'Pixel 4 landscape',
userAgent:
'Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36',
viewport: {
width: 745,
height: 353,
deviceScaleFactor: 3,
isMobile: true,
hasTouch: true,
isLandscape: true,
},
},
];
/**
* @public
Expand Down