diff --git a/front_end/entrypoints/lighthouse_worker/LighthouseWorkerService.ts b/front_end/entrypoints/lighthouse_worker/LighthouseWorkerService.ts index 336eced87f..c5f337a7d1 100644 --- a/front_end/entrypoints/lighthouse_worker/LighthouseWorkerService.ts +++ b/front_end/entrypoints/lighthouse_worker/LighthouseWorkerService.ts @@ -125,7 +125,7 @@ async function invokeLH(action: string, args: any): Promise { } // @ts-expect-error https://github.com/GoogleChrome/lighthouse/issues/11628 - const config = args.config || self.createConfig(args.categoryIDs, flags.emulatedFormFactor); + const config = args.config || self.createConfig(args.categoryIDs, flags.formFactor); const url = args.url; // Handle legacy Lighthouse runner path. diff --git a/front_end/panels/lighthouse/LighthouseController.ts b/front_end/panels/lighthouse/LighthouseController.ts index 88e3fcd96e..de9c37b801 100644 --- a/front_end/panels/lighthouse/LighthouseController.ts +++ b/front_end/panels/lighthouse/LighthouseController.ts @@ -346,21 +346,16 @@ export class LighthouseController extends Common.ObjectWrapper.ObjectWrapper { // See Audits.AuditsPanel._setupEmulationAndProtocolConnection() - flags.emulatedFormFactor = value; + flags.formFactor = value; }, options: [ {label: i18nLazyString(UIStrings.mobile), value: 'mobile'}, diff --git a/front_end/panels/lighthouse/LighthousePanel.ts b/front_end/panels/lighthouse/LighthousePanel.ts index c1ff44552f..0ed1716c05 100644 --- a/front_end/panels/lighthouse/LighthousePanel.ts +++ b/front_end/panels/lighthouse/LighthousePanel.ts @@ -454,8 +454,6 @@ export class LighthousePanel extends UI.Panel.Panel { * We set the device emulation on the DevTools-side for two reasons: * 1. To workaround some odd device metrics emulation bugs like occuluding viewports * 2. To get the attractive device outline - * - * We also set flags.internalDisableDeviceScreenEmulation = true to let LH only apply UA emulation */ private async setupEmulationAndProtocolConnection(): Promise { const flags = this.controller.getFlags(); @@ -475,10 +473,10 @@ export class LighthousePanel extends UI.Panel.Panel { }; emulationModel.toolbarControlsEnabledSetting().set(false); - if ('emulatedFormFactor' in flags && flags.emulatedFormFactor === 'desktop') { + if ('formFactor' in flags && flags.formFactor === 'desktop') { emulationModel.enabledSetting().set(false); emulationModel.emulate(EmulationModel.DeviceModeModel.Type.None, null, null); - } else if (flags.emulatedFormFactor === 'mobile') { + } else if (flags.formFactor === 'mobile') { emulationModel.enabledSetting().set(true); emulationModel.deviceOutlineSetting().set(true);