Module emulation

Source
Expand description

This domain emulates different environments for the page.

Structs§

ClearDeviceMetricsOverrideParams
Clears the overridden device metrics. clearDeviceMetricsOverride
ClearDeviceMetricsOverrideReturns
Clears the overridden device metrics. clearDeviceMetricsOverride
ClearDevicePostureOverrideParams
Clears a device posture override set with either setDeviceMetricsOverride() or setDevicePostureOverride() and starts using posture information from the platform again. Does nothing if no override is set. clearDevicePostureOverride
ClearDevicePostureOverrideReturns
Clears a device posture override set with either setDeviceMetricsOverride() or setDevicePostureOverride() and starts using posture information from the platform again. Does nothing if no override is set. clearDevicePostureOverride
ClearGeolocationOverrideParams
Clears the overridden Geolocation Position and Error. clearGeolocationOverride
ClearGeolocationOverrideReturns
Clears the overridden Geolocation Position and Error. clearGeolocationOverride
ClearIdleOverrideParams
Clears Idle state overrides. clearIdleOverride
ClearIdleOverrideReturns
Clears Idle state overrides. clearIdleOverride
DevicePosture
DevicePostureBuilder
DisplayFeature
DisplayFeatureBuilder
EventVirtualTimeBudgetExpired
Notification sent after the virtual time budget for the current VirtualTimePolicy has run out. virtualTimeBudgetExpired
GetOverriddenSensorInformationParams
GetOverriddenSensorInformationParamsBuilder
GetOverriddenSensorInformationReturns
GetOverriddenSensorInformationReturnsBuilder
MediaFeature
MediaFeatureBuilder
PressureMetadata
PressureMetadataBuilder
ResetPageScaleFactorParams
Requests that page scale factor is reset to initial values. resetPageScaleFactor
ResetPageScaleFactorReturns
Requests that page scale factor is reset to initial values. resetPageScaleFactor
ScreenOrientation
Screen orientation. ScreenOrientation
ScreenOrientationBuilder
SensorMetadata
SensorMetadataBuilder
SensorReading
SensorReadingBuilder
SensorReadingQuaternion
SensorReadingQuaternionBuilder
SensorReadingSingle
SensorReadingSingleBuilder
SensorReadingXyz
SensorReadingXyzBuilder
SetAutoDarkModeOverrideParams
Automatically render all web contents using a dark theme. setAutoDarkModeOverride
SetAutoDarkModeOverrideParamsBuilder
SetAutoDarkModeOverrideReturns
Automatically render all web contents using a dark theme. setAutoDarkModeOverride
SetAutomationOverrideParams
Allows overriding the automation flag. setAutomationOverride
SetAutomationOverrideParamsBuilder
SetAutomationOverrideReturns
Allows overriding the automation flag. setAutomationOverride
SetCpuThrottlingRateParams
Enables CPU throttling to emulate slow CPUs. setCPUThrottlingRate
SetCpuThrottlingRateParamsBuilder
SetCpuThrottlingRateReturns
Enables CPU throttling to emulate slow CPUs. setCPUThrottlingRate
SetDefaultBackgroundColorOverrideParams
Sets or clears an override of the default background color of the frame. This override is used if the content does not specify one. setDefaultBackgroundColorOverride
SetDefaultBackgroundColorOverrideParamsBuilder
SetDefaultBackgroundColorOverrideReturns
Sets or clears an override of the default background color of the frame. This override is used if the content does not specify one. setDefaultBackgroundColorOverride
SetDeviceMetricsOverrideParams
Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and “device-width”/“device-height”-related CSS media query results). setDeviceMetricsOverride
SetDeviceMetricsOverrideParamsBuilder
SetDeviceMetricsOverrideReturns
Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and “device-width”/“device-height”-related CSS media query results). setDeviceMetricsOverride
SetDevicePostureOverrideParams
Start reporting the given posture value to the Device Posture API. This override can also be set in setDeviceMetricsOverride(). setDevicePostureOverride
SetDevicePostureOverrideParamsBuilder
SetDevicePostureOverrideReturns
Start reporting the given posture value to the Device Posture API. This override can also be set in setDeviceMetricsOverride(). setDevicePostureOverride
SetDisabledImageTypesParams
SetDisabledImageTypesParamsBuilder
SetDisabledImageTypesReturns
SetDocumentCookieDisabledParams
SetDocumentCookieDisabledParamsBuilder
SetDocumentCookieDisabledReturns
SetEmitTouchEventsForMouseParams
SetEmitTouchEventsForMouseParamsBuilder
SetEmitTouchEventsForMouseReturns
SetEmulatedMediaParams
Emulates the given media type or media feature for CSS media queries. setEmulatedMedia
SetEmulatedMediaParamsBuilder
SetEmulatedMediaReturns
Emulates the given media type or media feature for CSS media queries. setEmulatedMedia
SetEmulatedVisionDeficiencyParams
Emulates the given vision deficiency. setEmulatedVisionDeficiency
SetEmulatedVisionDeficiencyParamsBuilder
SetEmulatedVisionDeficiencyReturns
Emulates the given vision deficiency. setEmulatedVisionDeficiency
SetFocusEmulationEnabledParams
Enables or disables simulating a focused and active page. setFocusEmulationEnabled
SetFocusEmulationEnabledParamsBuilder
SetFocusEmulationEnabledReturns
Enables or disables simulating a focused and active page. setFocusEmulationEnabled
SetGeolocationOverrideParams
Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable. setGeolocationOverride
SetGeolocationOverrideParamsBuilder
SetGeolocationOverrideReturns
Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable. setGeolocationOverride
SetHardwareConcurrencyOverrideParams
SetHardwareConcurrencyOverrideParamsBuilder
SetHardwareConcurrencyOverrideReturns
SetIdleOverrideParams
Overrides the Idle state. setIdleOverride
SetIdleOverrideParamsBuilder
SetIdleOverrideReturns
Overrides the Idle state. setIdleOverride
SetLocaleOverrideParams
Overrides default host system locale with the specified one. setLocaleOverride
SetLocaleOverrideParamsBuilder
SetLocaleOverrideReturns
Overrides default host system locale with the specified one. setLocaleOverride
SetPageScaleFactorParams
Sets a specified page scale factor. setPageScaleFactor
SetPageScaleFactorParamsBuilder
SetPageScaleFactorReturns
Sets a specified page scale factor. setPageScaleFactor
SetPressureSourceOverrideEnabledParams
Overrides a pressure source of a given type, as used by the Compute Pressure API, so that updates to PressureObserver.observe() are provided via setPressureStateOverride instead of being retrieved from platform-provided telemetry data. setPressureSourceOverrideEnabled
SetPressureSourceOverrideEnabledParamsBuilder
SetPressureSourceOverrideEnabledReturns
Overrides a pressure source of a given type, as used by the Compute Pressure API, so that updates to PressureObserver.observe() are provided via setPressureStateOverride instead of being retrieved from platform-provided telemetry data. setPressureSourceOverrideEnabled
SetPressureStateOverrideParams
Provides a given pressure state that will be processed and eventually be delivered to PressureObserver users. |source| must have been previously overridden by setPressureSourceOverrideEnabled. setPressureStateOverride
SetPressureStateOverrideParamsBuilder
SetPressureStateOverrideReturns
Provides a given pressure state that will be processed and eventually be delivered to PressureObserver users. |source| must have been previously overridden by setPressureSourceOverrideEnabled. setPressureStateOverride
SetScriptExecutionDisabledParams
Switches script execution in the page. setScriptExecutionDisabled
SetScriptExecutionDisabledParamsBuilder
SetScriptExecutionDisabledReturns
Switches script execution in the page. setScriptExecutionDisabled
SetScrollbarsHiddenParams
SetScrollbarsHiddenParamsBuilder
SetScrollbarsHiddenReturns
SetSensorOverrideEnabledParams
Overrides a platform sensor of a given type. If |enabled| is true, calls to Sensor.start() will use a virtual sensor as backend rather than fetching data from a real hardware sensor. Otherwise, existing virtual sensor-backend Sensor objects will fire an error event and new calls to Sensor.start() will attempt to use a real sensor instead. setSensorOverrideEnabled
SetSensorOverrideEnabledParamsBuilder
SetSensorOverrideEnabledReturns
Overrides a platform sensor of a given type. If |enabled| is true, calls to Sensor.start() will use a virtual sensor as backend rather than fetching data from a real hardware sensor. Otherwise, existing virtual sensor-backend Sensor objects will fire an error event and new calls to Sensor.start() will attempt to use a real sensor instead. setSensorOverrideEnabled
SetSensorOverrideReadingsParams
Updates the sensor readings reported by a sensor type previously overridden by setSensorOverrideEnabled. setSensorOverrideReadings
SetSensorOverrideReadingsParamsBuilder
SetSensorOverrideReadingsReturns
Updates the sensor readings reported by a sensor type previously overridden by setSensorOverrideEnabled. setSensorOverrideReadings
SetTimezoneOverrideParams
Overrides default host system timezone with the specified one. setTimezoneOverride
SetTimezoneOverrideParamsBuilder
SetTimezoneOverrideReturns
Overrides default host system timezone with the specified one. setTimezoneOverride
SetTouchEmulationEnabledParams
Enables touch on platforms which do not support them. setTouchEmulationEnabled
SetTouchEmulationEnabledParamsBuilder
SetTouchEmulationEnabledReturns
Enables touch on platforms which do not support them. setTouchEmulationEnabled
SetUserAgentOverrideParams
Allows overriding user agent with the given string. userAgentMetadata must be set for Client Hint headers to be sent. setUserAgentOverride
SetUserAgentOverrideParamsBuilder
SetUserAgentOverrideReturns
Allows overriding user agent with the given string. userAgentMetadata must be set for Client Hint headers to be sent. setUserAgentOverride
SetVirtualTimePolicyParams
Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets the current virtual time policy. Note this supersedes any previous time budget. setVirtualTimePolicy
SetVirtualTimePolicyParamsBuilder
SetVirtualTimePolicyReturns
Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets the current virtual time policy. Note this supersedes any previous time budget. setVirtualTimePolicy
SetVirtualTimePolicyReturnsBuilder
UserAgentBrandVersion
Used to specify User Agent Client Hints to emulate. See https://wicg.github.io/ua-client-hints UserAgentBrandVersion
UserAgentBrandVersionBuilder
UserAgentMetadata
Used to specify User Agent Client Hints to emulate. See https://wicg.github.io/ua-client-hints Missing optional values will be filled in by the target with what it would normally use. UserAgentMetadata
UserAgentMetadataBuilder

Enums§

DevicePostureType
Current posture of the device
DisabledImageType
Enum of image types that can be disabled.
DisplayFeatureOrientation
Orientation of a display feature in relation to screen
PressureSource
PressureState
ScreenOrientationType
Orientation type.
SensorType
Used to specify sensor types to emulate. See https://w3c.github.io/sensors/#automation for more information.
SetEmitTouchEventsForMouseConfiguration
Touch/gesture events configuration. Default: current platform.
SetEmulatedVisionDeficiencyType
Vision deficiency to emulate. Order: best-effort emulations come first, followed by any physiologically accurate emulations for medically recognized color vision deficiencies.
VirtualTimePolicy
advance: If the scheduler runs out of immediate work, the virtual time base may fast forward to allow the next delayed task (if any) to run; pause: The virtual time base may not advance; pauseIfNetworkFetchesPending: The virtual time base may not advance if there are any pending resource fetches.