From 0b223e55075647a7d652b78ddec09c07e09aa6e9 Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Thu, 10 Jan 2019 11:43:04 -0800 Subject: [PATCH] misc(emulation): use correct Nexus 5X screen size (#6932) --- lighthouse-cli/cli-flags.js | 2 +- lighthouse-core/lib/emulation.js | 4 ++-- .../test/fixtures/artifacts/perflog/artifacts.json | 4 ++-- lighthouse-core/test/results/artifacts/artifacts.json | 4 ++-- lighthouse-core/test/runner-test.js | 2 +- readme.md | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lighthouse-cli/cli-flags.js b/lighthouse-cli/cli-flags.js index c6ca5dd57643..6aefa4edbbdb 100644 --- a/lighthouse-cli/cli-flags.js +++ b/lighthouse-cli/cli-flags.js @@ -35,7 +35,7 @@ function getFlags(manualArgv) { 'lighthouse --disable-device-emulation --throttling-method=provided', 'Disable device emulation and all throttling') .example( - 'lighthouse --chrome-flags="--window-size=412,732"', + 'lighthouse --chrome-flags="--window-size=412,660"', 'Launch Chrome with a specific window size') .example( 'lighthouse --quiet --chrome-flags="--headless"', diff --git a/lighthouse-core/lib/emulation.js b/lighthouse-core/lib/emulation.js index b27406c6edfa..73a4437477ed 100644 --- a/lighthouse-core/lib/emulation.js +++ b/lighthouse-core/lib/emulation.js @@ -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, diff --git a/lighthouse-core/test/fixtures/artifacts/perflog/artifacts.json b/lighthouse-core/test/fixtures/artifacts/perflog/artifacts.json index 777cdf1b619f..8af6b351ab13 100644 --- a/lighthouse-core/test/fixtures/artifacts/perflog/artifacts.json +++ b/lighthouse-core/test/fixtures/artifacts/perflog/artifacts.json @@ -12,9 +12,9 @@ "Viewport": null, "ViewportDimensions": { "innerWidth": 412, - "innerHeight": 732, + "innerHeight": 660, "outerWidth": 412, - "outerHeight": 732, + "outerHeight": 660, "devicePixelRatio": 2.625 } } diff --git a/lighthouse-core/test/results/artifacts/artifacts.json b/lighthouse-core/test/results/artifacts/artifacts.json index 3e7fc8677c99..09f5ae673524 100644 --- a/lighthouse-core/test/results/artifacts/artifacts.json +++ b/lighthouse-core/test/results/artifacts/artifacts.json @@ -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, diff --git a/lighthouse-core/test/runner-test.js b/lighthouse-core/test/runner-test.js index 8774274e2ea5..c0f11d7dab75 100644 --- a/lighthouse-core/test/runner-test.js +++ b/lighthouse-core/test/runner-test.js @@ -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); }); }); diff --git a/readme.md b/readme.md index c9882b27fe16..f07bb1b3c2aa 100644 --- a/readme.md +++ b/readme.md @@ -106,7 +106,7 @@ Examples: lighthouse --output=json --output-path=./report.json --save-assets Save trace, devtoolslog, and named JSON report. lighthouse --disable-device-emulation Disable device emulation and all throttling. --throttling-method=provided - lighthouse --chrome-flags="--window-size=412,732" Launch Chrome with a specific window size + lighthouse --chrome-flags="--window-size=412,660" Launch Chrome with a specific window size lighthouse --quiet --chrome-flags="--headless" Launch Headless Chrome, turn off logging lighthouse --extra-headers "{\"Cookie\":\"monster=blue\"}" Stringify\'d JSON HTTP Header key/value pairs to send in requests lighthouse --extra-headers=./path/to/file.json Path to JSON file of HTTP Header key/value pairs to send in requests