Intent to Prototype and Ship: Compute Pressure WebDriver endpoints

556 views
Skip to first unread message

Mandy, Arnaud

unread,
Jun 19, 2024, 3:55:11 AMJun 19
to Abridged recipients
Contact emails

Specification

Summary
This exposes WebDriver commands for creating, removing and updating pressure source samples for so-called "virtual pressure sources": pressure sources that do not depend on underlying hardware or operating system support and can be used for testing.

Not only does this allow ChromeDriver users to test this API more easily, but it was also one of the suggestions brought up during the Intent to Ship thread for this API, as the existing web tests in WPT depend on MojoJS and are not interoperable.

Blink component

TAG review
None

TAG review status
Not applicable

Risks


Interoperability and Compatibility
This feature implements WebDriver extension commands in ChromeDriver that are used in web-platform-tests and can also be used by ChromeDriver users. This feature is therefore not web-exposed, but it does intend to help increase adoption of the spec by making it possible for any implementation to run the existing web tests without having to use JS mocks that are heavily Mojo-based although not dependent on Mojo.

Gecko: No signal for this feature (Not in favor of Compute Pressure API)

WebKit: No signal for this feature (Not in favor of Compute Pressure API)

Web developers: No signals

Other signals: Compute Pressure API Intent To Ship comment.


Security
n/a, this is exposed through WebDriver. There have been changes to the Compute Pressure code in //content and //services.

WebView application risks
None, this API is not exposed on Android.

Ongoing technical constraints
WebDriver endpoints and virtual pressure sources work in Window and Dedicated Worker scopes, but not shared worker ones: we store virtual pressure source information in WebContentsUserData, which does not integrate well with shared workers. Shared worker support would need to work with origins instead, but doing so would not play well with any DevTools frontend work to support the Compute Pressure API. The same constraint is also present in the spec, and feedback is being gathered in issue 285.

Debuggability
This is a debugging feature. It exposes new ChromeDriver and CDP endpoints, but the DevTools frontend has not been touched.

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?
Windows, Mac, Linux, ChromeOS

Is this feature fully tested by web-platform-tests?
The feature is currently tested by WPT, but the tests depend on Mojo-specific JS mocks. Having these endpoints is the first step towards making the existing web tests interoperable.

Requires code in //chrome?
True: //chrome/test/chromedriver

Tracking bug

Estimated milestones
Shipping on desktop 130


Link to entry on the Chrome Platform Status

Yoav Weiss (@Shopify)

unread,
Jun 19, 2024, 11:53:03 AMJun 19
to Mandy, Arnaud, Mathias Bynens, Alex Rudenko, Abridged recipients
+Mathias Bynens +Alex Rudenko  - I'd love to hear your thoughts on this in general and on the PR in particular.

Arnaud - was this discussed with the WebDriver WG? Even if other vendors are opposed to the broader feature, it'd still be good to validate the design.
 

Summary
This exposes WebDriver commands for creating, removing and updating pressure source samples for so-called "virtual pressure sources": pressure sources that do not depend on underlying hardware or operating system support and can be used for testing.

Not only does this allow ChromeDriver users to test this API more easily, but it was also one of the suggestions brought up during the Intent to Ship thread for this API, as the existing web tests in WPT depend on MojoJS and are not interoperable.

Blink component

TAG review
None

TAG review status
Not applicable

Risks


Interoperability and Compatibility
This feature implements WebDriver extension commands in ChromeDriver that are used in web-platform-tests and can also be used by ChromeDriver users. This feature is therefore not web-exposed, but it does intend to help increase adoption of the spec by making it possible for any implementation to run the existing web tests without having to use JS mocks that are heavily Mojo-based although not dependent on Mojo.

Gecko: No signal for this feature (Not in favor of Compute Pressure API)

WebKit: No signal for this feature (Not in favor of Compute Pressure API)

I agree that there's no point in filing for a signal if they are opposed to the feature itself.
 

Web developers: No signals

Other signals: Compute Pressure API Intent To Ship comment.


Security
n/a, this is exposed through WebDriver. There have been changes to the Compute Pressure code in //content and //services.

WebView application risks
None, this API is not exposed on Android.

Ongoing technical constraints
WebDriver endpoints and virtual pressure sources work in Window and Dedicated Worker scopes, but not shared worker ones: we store virtual pressure source information in WebContentsUserData, which does not integrate well with shared workers. Shared worker support would need to work with origins instead, but doing so would not play well with any DevTools frontend work to support the Compute Pressure API. The same constraint is also present in the spec, and feedback is being gathered in issue 285.

Debuggability
This is a debugging feature. It exposes new ChromeDriver and CDP endpoints, but the DevTools frontend has not been touched.

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?
Windows, Mac, Linux, ChromeOS

Is this feature fully tested by web-platform-tests?
The feature is currently tested by WPT, but the tests depend on Mojo-specific JS mocks. Having these endpoints is the first step towards making the existing web tests interoperable.

Requires code in //chrome?
True: //chrome/test/chromedriver

Tracking bug

Estimated milestones
Shipping on desktop 130


Link to entry on the Chrome Platform Status

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/DS0PR11MB79029DDFA8D49E3C82BEAF4393CF2%40DS0PR11MB7902.namprd11.prod.outlook.com.

Mathias Bynens

unread,
Jun 19, 2024, 11:56:07 AMJun 19
to Yoav Weiss (@Shopify), Mandy, Arnaud, Alex Rudenko, Abridged recipients, Maksim Sadym

Alex Rudenko

unread,
Jun 20, 2024, 3:11:38 AMJun 20
to Mathias Bynens, Yoav Weiss (@Shopify), Mandy, Arnaud, Abridged recipients, Maksim Sadym
Hi Yoav,

I think external specifications can define extension commands independently (in their respective WGs) so there is no need to discuss them with the WebDriver WG (unless you want to).
The API for testing pressure looks good to me and it would be nice if the spec also defined a WebDriver BiDi module.

Best regards,
Alex

Raphael Kubo da Costa

unread,
Jun 24, 2024, 7:37:21 AMJun 24
to blin...@chromium.org
Complementing what Alex has said, seeking review from the WebDriver WG
is not strictly necessary, and since these endpoints are modelled after
the Generic Sensor and Device Posture ones it felt like there was no
need to involve the WG before starting this Intent thread.

As for BiDi support, Alex and I have been talking on
https://github.com/w3c/compute-pressure/pull/284 and I've filed
https://github.com/w3c/compute-pressure/issues/288 to track specifying a
BiDi module. The tl;dr is that it would help projects like Puppeteer
which are BiDi-only, but would not deliver improvements to what we can
already do with the WebDriver Classic endpoints (i.e. we do not need
BiDi's bidirectional capabilities).
> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAHuqpVPwY2KCbyNPp3AhL_fjM8%3D3eCU8hj%2B5fDu2hHOLjv1fvQ%40mail.gmail.com.

Mike Taylor

unread,
Jun 24, 2024, 10:29:07 AMJun 24
to Mandy, Arnaud, Abridged recipients

Could you please request reviews for the various review gate bits in your chromestatus entry?


(privacy, security, enterprise... etc)

Raphael Kubo da Costa

unread,
Jun 24, 2024, 11:03:08 AMJun 24
to blin...@chromium.org
Done!

Mike Taylor <mike...@chromium.org> writes:
> Could you please request reviews for the various review gate bits in
> your chromestatus entry?
>
>
> (privacy, security, enterprise... etc)
>
>
> On 6/19/24 3:54 AM, Mandy, Arnaud wrote:
>> Contact emails
>> raphael.ku...@intel.com
>> <mailto:raphael.ku...@intel.com>, juha.j...@intel.com
>> <mailto:juha.j...@intel.com>, kenneth.r.c...@intel.com
>> <mailto:kenneth.r.c...@intel.com>, arnaud...@intel.com
>> <mailto:arnaud...@intel.com>
>>
>> Specification
>> https://github.com/w3c/compute-pressure/pull/284
>> <https://github.com/w3c/compute-pressure/pull/284>
>>
>> Summary
>> This exposes WebDriver commands for creating, removing and updating
>> pressure source samples for so-called "virtual pressure sources":
>> pressure sources that do not depend on underlying hardware or
>> operating system support and can be used for testing.
>>
>> Not only does this allow ChromeDriver users to test this API more
>> easily, but it was also one of the suggestions brought up during the
>> Intent to Ship thread for this API
>> <https://groups.google.com/a/chromium.org/g/blink-dev/c/7leKysvPZWk/m/MEtDE7zyAQAJ>,
>> as the existing web tests in WPT depend on MojoJS and are not
>> interoperable.
>>
>> Blink component
>> Blink>PerformanceAPIs>ComputePressure
>> <https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink%3EPerformanceAPIs%3EComputePressure>
>>
>> TAG review
>> None
>>
>> TAG review status
>> Not applicable
>>
>> Risks
>>
>>
>> Interoperability and Compatibility
>> This feature implements WebDriver extension commands in ChromeDriver
>> that are used in web-platform-tests and can also be used by
>> ChromeDriver users. This feature is therefore not web-exposed, but
>> it does intend to help increase adoption of the spec by making it
>> possible for any implementation to run the existing web tests
>> without having to use JS mocks that are heavily Mojo-based although
>> not dependent on Mojo.
>>
>> /Gecko/: No signal for this feature (Not in favor of Compute Pressure API)
>>
>> /WebKit/: No signal for this feature (Not in favor of Compute
>> Pressure API)
>>
>> /Web developers/: No signals
>>
>> /Other signals/: Compute Pressure API Intent To Ship comment
>> <https://groups.google.com/a/chromium.org/g/blink-dev/c/7leKysvPZWk/m/MEtDE7zyAQAJ>.
>>
>>
>> Security
>> n/a, this is exposed through WebDriver. There have been changes to
>> the Compute Pressure code in //content and //services.
>>
>> WebView application risks
>> None, this API is not exposed on Android.
>>
>> Ongoing technical constraints
>> WebDriver endpoints and virtual pressure sources work in Window and
>> Dedicated Worker scopes, but not shared worker ones: we store
>> virtual pressure source information in WebContentsUserData, which
>> does not integrate well with shared workers. Shared worker support
>> would need to work with origins instead, but doing so would not play
>> well with any DevTools frontend work to support the Compute Pressure
>> API. The same constraint is also present in the spec, and feedback
>> is being gathered in issue 285
>> <https://github.com/w3c/compute-pressure/issues/285>.
>>
>> Debuggability
>> This is a debugging feature. It exposes new ChromeDriver and CDP
>> endpoints, but the DevTools frontend has not been touched.
>>
>> Will this feature be supported on all six Blink platforms (Windows,
>> Mac, Linux, ChromeOS, Android, and Android WebView)?
>> Windows, Mac, Linux, ChromeOS
>>
>> Is this feature fully tested by web-platform-tests
>> <https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md>?
>> The feature is currently tested by WPT, but the tests depend on
>> Mojo-specific JS mocks. Having these endpoints is the first step
>> towards making the existing web tests interoperable.
>>
>> Requires code in //chrome?
>> True: //chrome/test/chromedriver
>>
>> Tracking bug
>> https://issues.chromium.org/u/1/issues/347031400
>> <https://issues.chromium.org/u/1/issues/347031400>
>>
>> Estimated milestones
>> Shipping on desktop 130
>>
>>
>> Link to entry on the Chrome Platform Status
>> https://chromestatus.com/feature/5130657352384512
>> <https://chromestatus.com/feature/5130657352384512>
>>
>> -- You received this message because you are subscribed to the
>> Google Groups "blink-dev" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to blink-dev+...@chromium.org.
>> To view this discussion on the web visit
>> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/DS0PR11MB79029DDFA8D49E3C82BEAF4393CF2%40DS0PR11MB7902.namprd11.prod.outlook.com
>> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/DS0PR11MB79029DDFA8D49E3C82BEAF4393CF2%40DS0PR11MB7902.namprd11.prod.outlook.com?utm_medium=email&utm_source=footer>.

Mike Taylor

unread,
Jun 24, 2024, 3:05:57 PMJun 24
to Raphael Kubo da Costa, blin...@chromium.org
Thanks - LGTM1

Vladimir Levin

unread,
Jun 25, 2024, 11:15:52 AMJun 25
to Mike Taylor, Raphael Kubo da Costa, blin...@chromium.org

Chris Harrelson

unread,
Jun 25, 2024, 11:49:28 AMJun 25
to Vladimir Levin, Mike Taylor, Raphael Kubo da Costa, blin...@chromium.org
Reply all
Reply to author
Forward
0 new messages