Emulation Domain
Functions
Add a new screen to the device. Only supported in headless mode.
Tells whether emulation is supported.
Clears the overridden device metrics.
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.
Clears the display features override set with either setDeviceMetricsOverride() or setDisplayFeaturesOverride() and starts using display features from the platform again. Does nothing if no override is set.
Clears the overridden Geolocation Position and Error.
Clears Idle state overrides.
Subscribes to all events related to this domain.
(undocumented in the protocol definition)
Returns device's screen configuration.
Remove screen from the device. Only supported in headless mode.
Requests that page scale factor is reset to initial values.
Automatically render all web contents using a dark theme.
Allows overriding the automation flag.
Enables CPU throttling to emulate slow CPUs.
Override the value of navigator.connection.saveData
Sets or clears an override of the default background color of the frame. This override is used if the content does not specify one.
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).
Start reporting the given posture value to the Device Posture API. This override can also be set in setDeviceMetricsOverride().
(undocumented in the protocol definition)
Start using the given display features to pupulate the Viewport Segments API. This override can also be set in setDeviceMetricsOverride().
(undocumented in the protocol definition)
(undocumented in the protocol definition)
Emulates the given media type or media feature for CSS media queries.
Emulates the given OS text scale.
Emulates the given vision deficiency.
Enables or disables simulating a focused and active page.
Overrides the Geolocation Position or Error. Omitting latitude, longitude or accuracy emulates position unavailable.
(undocumented in the protocol definition)
Overrides the Idle state.
Overrides default host system locale with the specified one.
Overrides value returned by the javascript navigator object.
Sets a specified page scale factor.
Provides a given pressure data set that will be processed and eventually be delivered to PressureObserver users. |source| must have been previously overridden by 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.
TODO: OBSOLETE: To remove when setPressureDataOverride is merged. Provides a given pressure state that will be processed and eventually be delivered to PressureObserver users. |source| must have been previously overridden by setPressureSourceOverrideEnabled.
Overrides the values for env(safe-area-inset-) and env(safe-area-max-inset-). Unset values will cause the respective variables to be undefined, even if previously overridden.
Switches script execution in the page.
(undocumented in the protocol definition)
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.
Updates the sensor readings reported by a sensor type previously overridden by setSensorOverrideEnabled.
Allows overriding the difference between the small and large viewport sizes, which determine the value of the svh and lvh unit, respectively. Only supported for top-level frames.
Overrides default host system timezone with the specified one.
Enables touch on platforms which do not support them.
Allows overriding user agent with the given string. userAgentMetadata must be set for Client Hint headers to be sent.
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.
Resizes the frame/viewport of the page. Note that this does not affect the frame's container (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported on Android.
Notification sent after the virtual time budget for the current VirtualTimePolicy has run out.