diff --git a/front_end/panels/lighthouse/LighthouseController.ts b/front_end/panels/lighthouse/LighthouseController.ts index 5ced4b51b9..88e3fcd96e 100644 --- a/front_end/panels/lighthouse/LighthouseController.ts +++ b/front_end/panels/lighthouse/LighthouseController.ts @@ -309,6 +309,9 @@ export class LighthouseController extends Common.ObjectWrapper.ObjectWrapper usage.usage) .map(usage => STORAGE_TYPE_NAMES.get(usage.storageType)) .map(i18nStringFn => i18nStringFn ? i18nStringFn() : undefined) diff --git a/test/webtests/http/tests/devtools/lighthouse/lighthouse-flags-run.js b/test/webtests/http/tests/devtools/lighthouse/lighthouse-flags-run.js index 48d11c7740..d6c3c8e475 100644 --- a/test/webtests/http/tests/devtools/lighthouse/lighthouse-flags-run.js +++ b/test/webtests/http/tests/devtools/lighthouse/lighthouse-flags-run.js @@ -9,12 +9,13 @@ await TestRunner.loadTestModule('lighthouse_test_runner'); await TestRunner.showPanel('lighthouse'); - const dialogElement = LighthouseTestRunner.getContainerElement(); - dialogElement.querySelector('input[name="lighthouse.device_type"][value="desktop"]').click(); - // Turn off simulated throttling. - dialogElement.querySelector('.lighthouse-settings-pane .toolbar') - .shadowRoot.querySelector('option[value="devtools"]') - .selected = true; + // Turn off simulated throttling and use mobile. + const throttlingSetting = + self.Common.Settings.instance().createSetting('lighthouse.throttling', 'simulate', 'Synced'); + throttlingSetting.set('devtools'); + + const deviceSetting = self.Common.Settings.instance().createSetting('lighthouse.device_type', 'mobile', 'Synced'); + deviceSetting.set('desktop'); LighthouseTestRunner.dumpStartAuditState(); LighthouseTestRunner.getRunButton().click(); diff --git a/test/webtests/platform/generic/http/tests/devtools/lighthouse/lighthouse-emulate-run-expected.txt b/test/webtests/platform/generic/http/tests/devtools/lighthouse/lighthouse-emulate-run-expected.txt index 4bb2d9beb8..142018c89f 100644 --- a/test/webtests/platform/generic/http/tests/devtools/lighthouse/lighthouse-emulate-run-expected.txt +++ b/test/webtests/platform/generic/http/tests/devtools/lighthouse/lighthouse-emulate-run-expected.txt @@ -15,7 +15,7 @@ Analyze page load: enabled visible =============== Lighthouse Results =============== URL: http://127.0.0.1:8000/devtools/lighthouse/resources/lighthouse-emulate-pass.html -Version: 9.6.1 +Version: 9.6.2 formFactor: mobile screenEmulation: { "mobile": true, diff --git a/test/webtests/platform/generic/http/tests/devtools/lighthouse/lighthouse-successful-navigation-expected.txt b/test/webtests/platform/generic/http/tests/devtools/lighthouse/lighthouse-successful-navigation-expected.txt index 064f438784..3d982a9080 100644 --- a/test/webtests/platform/generic/http/tests/devtools/lighthouse/lighthouse-successful-navigation-expected.txt +++ b/test/webtests/platform/generic/http/tests/devtools/lighthouse/lighthouse-successful-navigation-expected.txt @@ -262,7 +262,7 @@ Generating results... =============== Lighthouse Results =============== URL: http://127.0.0.1:8000/devtools/lighthouse/resources/lighthouse-basic.html -Version: 9.6.1 +Version: 9.6.2 ViewportDimensions: { "innerWidth": 980, "innerHeight": 1743, diff --git a/test/webtests/platform/generic/http/tests/devtools/lighthouse/lighthouse-successful-run-expected.txt b/test/webtests/platform/generic/http/tests/devtools/lighthouse/lighthouse-successful-run-expected.txt index ee4926a0fa..1ebde799d7 100644 --- a/test/webtests/platform/generic/http/tests/devtools/lighthouse/lighthouse-successful-run-expected.txt +++ b/test/webtests/platform/generic/http/tests/devtools/lighthouse/lighthouse-successful-run-expected.txt @@ -373,7 +373,7 @@ Generating results... =============== Lighthouse Results =============== URL: http://127.0.0.1:8000/devtools/lighthouse/resources/lighthouse-basic.html -Version: 9.6.1 +Version: 9.6.2 ViewportDimensions: { "innerWidth": 980, "innerHeight": 1743,