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

misc(emulation): Use Nexus 5X emulation real screen size #6932

Merged
merged 1 commit into from
Jan 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lighthouse-cli/cli-flags.js
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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