Expand description
This domain emulates different environments for the page.
Structs§
- Clears the overridden device metrics. clearDeviceMetricsOverride
- Clears the overridden device metrics. clearDeviceMetricsOverride
- 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
- 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
- Clears the overridden Geolocation Position and Error. clearGeolocationOverride
- Clears the overridden Geolocation Position and Error. clearGeolocationOverride
- Clears Idle state overrides. clearIdleOverride
- Clears Idle state overrides. clearIdleOverride
- Notification sent after the virtual time budget for the current VirtualTimePolicy has run out. virtualTimeBudgetExpired
- Requests that page scale factor is reset to initial values. resetPageScaleFactor
- Requests that page scale factor is reset to initial values. resetPageScaleFactor
- Screen orientation. ScreenOrientation
- Automatically render all web contents using a dark theme. setAutoDarkModeOverride
- Automatically render all web contents using a dark theme. setAutoDarkModeOverride
- Allows overriding the automation flag. setAutomationOverride
- Allows overriding the automation flag. setAutomationOverride
- Enables CPU throttling to emulate slow CPUs. setCPUThrottlingRate
- Enables CPU throttling to emulate slow CPUs. setCPUThrottlingRate
- 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
- 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
- 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
- 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
- Start reporting the given posture value to the Device Posture API. This override can also be set in setDeviceMetricsOverride(). setDevicePostureOverride
- Start reporting the given posture value to the Device Posture API. This override can also be set in setDeviceMetricsOverride(). setDevicePostureOverride
- Emulates the given media type or media feature for CSS media queries. setEmulatedMedia
- Emulates the given media type or media feature for CSS media queries. setEmulatedMedia
- Emulates the given vision deficiency. setEmulatedVisionDeficiency
- Emulates the given vision deficiency. setEmulatedVisionDeficiency
- Enables or disables simulating a focused and active page. setFocusEmulationEnabled
- Enables or disables simulating a focused and active page. setFocusEmulationEnabled
- Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable. setGeolocationOverride
- Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable. setGeolocationOverride
- Overrides the Idle state. setIdleOverride
- Overrides the Idle state. setIdleOverride
- Overrides default host system locale with the specified one. setLocaleOverride
- Overrides default host system locale with the specified one. setLocaleOverride
- Sets a specified page scale factor. setPageScaleFactor
- Sets a specified page scale factor. setPageScaleFactor
- 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
- 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
- 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
- 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
- Switches script execution in the page. setScriptExecutionDisabled
- Switches script execution in the page. setScriptExecutionDisabled
- 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
- 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
- Updates the sensor readings reported by a sensor type previously overridden by setSensorOverrideEnabled. setSensorOverrideReadings
- Updates the sensor readings reported by a sensor type previously overridden by setSensorOverrideEnabled. setSensorOverrideReadings
- Overrides default host system timezone with the specified one. setTimezoneOverride
- Overrides default host system timezone with the specified one. setTimezoneOverride
- Enables touch on platforms which do not support them. setTouchEmulationEnabled
- Enables touch on platforms which do not support them. setTouchEmulationEnabled
- Allows overriding user agent with the given string.
userAgentMetadata
must be set for Client Hint headers to be sent. setUserAgentOverride - Allows overriding user agent with the given string.
userAgentMetadata
must be set for Client Hint headers to be sent. setUserAgentOverride - 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
- 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
- Used to specify User Agent Client Hints to emulate. See https://wicg.github.io/ua-client-hints UserAgentBrandVersion
- 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
Enums§
- Current posture of the device
- Enum of image types that can be disabled.
- Orientation of a display feature in relation to screen
- Orientation type.
- Used to specify sensor types to emulate. See https://w3c.github.io/sensors/#automation for more information.
- Touch/gesture events configuration. Default: current platform.
- Vision deficiency to emulate. Order: best-effort emulations come first, followed by any physiologically accurate emulations for medically recognized color vision deficiencies.
- 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.