Skip to content

Commit

Permalink
misc(emulation): use correct Nexus 5X screen size (#6932)
Browse files Browse the repository at this point in the history
  • Loading branch information
exterkamp authored and brendankenny committed Jan 10, 2019
1 parent d5053e4 commit 0b223e5
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lighthouse-cli/cli-flags.js
Expand Up @@ -35,7 +35,7 @@ function getFlags(manualArgv) {
'lighthouse <url> --disable-device-emulation --throttling-method=provided',
'Disable device emulation and all throttling')
.example(
'lighthouse <url> --chrome-flags="--window-size=412,732"',
'lighthouse <url> --chrome-flags="--window-size=412,660"',
'Launch Chrome with a specific window size')
.example(
'lighthouse <url> --quiet --chrome-flags="--headless"',
Expand Down
4 changes: 2 additions & 2 deletions lighthouse-core/lib/emulation.js
Expand Up @@ -14,9 +14,9 @@
const NEXUS5X_EMULATION_METRICS = {
mobile: true,
screenWidth: 412,
screenHeight: 732,
screenHeight: 660,
width: 412,
height: 732,
height: 660,
positionX: 0,
positionY: 0,
scale: 1,
Expand Down
Expand Up @@ -12,9 +12,9 @@
"Viewport": null,
"ViewportDimensions": {
"innerWidth": 412,
"innerHeight": 732,
"innerHeight": 660,
"outerWidth": 412,
"outerHeight": 732,
"outerHeight": 660,
"devicePixelRatio": 2.625
}
}
4 changes: 2 additions & 2 deletions lighthouse-core/test/results/artifacts/artifacts.json
Expand Up @@ -124,9 +124,9 @@
"Viewport": "width=device-width, initial-scale=1, minimum-scale=1",
"ViewportDimensions": {
"innerWidth": 412,
"innerHeight": 732,
"innerHeight": 660,
"outerWidth": 412,
"outerHeight": 732,
"outerHeight": 660,
"devicePixelRatio": 2.625
},
"ThemeColor": null,
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/test/runner-test.js
Expand Up @@ -478,7 +478,7 @@ describe('Runner', () => {

return Runner.run({}, {config}).then(results => {
assert.strictEqual(results.artifacts.ViewportDimensions.innerWidth, 412);
assert.strictEqual(results.artifacts.ViewportDimensions.innerHeight, 732);
assert.strictEqual(results.artifacts.ViewportDimensions.innerHeight, 660);
});
});

Expand Down
2 changes: 1 addition & 1 deletion readme.md
Expand Up @@ -106,7 +106,7 @@ Examples:
lighthouse <url> --output=json --output-path=./report.json --save-assets Save trace, devtoolslog, and named JSON report.
lighthouse <url> --disable-device-emulation Disable device emulation and all throttling.
--throttling-method=provided
lighthouse <url> --chrome-flags="--window-size=412,732" Launch Chrome with a specific window size
lighthouse <url> --chrome-flags="--window-size=412,660" Launch Chrome with a specific window size
lighthouse <url> --quiet --chrome-flags="--headless" Launch Headless Chrome, turn off logging
lighthouse <url> --extra-headers "{\"Cookie\":\"monster=blue\"}" Stringify\'d JSON HTTP Header key/value pairs to send in requests
lighthouse <url> --extra-headers=./path/to/file.json Path to JSON file of HTTP Header key/value pairs to send in requests
Expand Down

0 comments on commit 0b223e5

Please sign in to comment.