[PSA] Web Platform Tests that require MojoJS now work on wpt.fyi

29 views
Skip to first unread message

Robert Ma

unread,
Aug 19, 2020, 10:25:19 AM8/19/20
to blink-dev, ecosystem-infra, xr-...@chromium.org, devic...@chromium.org
Hello Blink developers,

I'm happy to announce that Web Platform Tests (WPT) that require MojoJS now work upstream (on wpt.fyi) with official binaries out of the box starting from M86 (currently Dev). Check out WebXR and WebUSB test results before and after enabling MojoJS. (These tests continue to work in Chromium CI.)

Most of the generated *.mojom.js files checked into web_tests/external/wpt have been removed (the remaining will be soon). There is no need to check generated Mojo bindings into WPT from now on; a presubmit check has been added.

You can find more about how to add new MojoJS-backed tests in this doc. Note that testdriver.js (WebDriver extensions) still remain our top recommendation for test automation. Feel free to reach out to ecosyst...@chromium.org if you have any questions.

Cheers,
Robert from Ecosystem Infra team

Raphael Kubo Da Costa

unread,
Aug 20, 2020, 7:08:35 AM8/20/20
to ecosystem-infra, ecosystem-infra
Hi Robert,

I see https://crbug.com/1094512 being referenced in a few commits that made this possible in WPT, but I get a permission denied error when trying to view it. Is there a public tracking bug for this effort? There are a few Generic Sensors and Image Capture .mojom.js files in WPT, but it's not clear if you're working on getting rid of them or if us working on those areas should be responsible for that.

Robert Ma

unread,
Aug 20, 2020, 11:39:36 AM8/20/20
to Raphael Kubo Da Costa, ecosystem-infra
Hi Raphael, the bug is internal as it touches the official builders. Sorry about that. FWIW, it's been closed now; in other words, let's open a new issue to track Generic Sensor and Image Capture, which I also just found out when going through the remaining *.mojom.js files in WPT.

The first question is: do these two APIs have spec'ed their corresponding test APIs similar to what WebXR/WebUSB did? Short of a (draft) spec, an explainer would be great, too.

--
You received this message because you are subscribed to the Google Groups "ecosystem-infra" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ecosystem-inf...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/ecosystem-infra/0c990a77-9e45-49a9-9ae4-66802b67f469n%40chromium.org.

Raphael Kubo Da Costa

unread,
Aug 25, 2020, 10:04:38 AM8/25/20
to ecosystem-infra
Thanks, Robert! I've assigned the new bug to a colleague and we should have something up soon.

The Generic Sensors spec has an Automation section that covers what we expect, but I don't think the Image Capture spec has anything similar. In any case, my understanding is that we're only interested in removing the *.mojom.js files from resources/chromium, but not the other files. If so, then I guess that's OK, as the code that connects to Mojo is in resources/chromium/generic_sensor_mocks.js and resources/chromium/mock-imagecapture.js, which we don't need to change.

Robert Ma

unread,
Aug 25, 2020, 10:09:22 AM8/25/20
to Raphael Kubo Da Costa, ecosystem-infra
Generic Sensor looks perfect!

Regarding Image Capture, yeah we can move its *.mojom.js file into the canonical archive, basically grandfathering it in. Moving forward, if a feature would like to use MojoJS for its test-only API, a formal definition of the test API will be required. (It'd still be great to document the test API for Image Capture, even in the form of an explainer.)

Raphael Kubo Da Costa

unread,
Aug 27, 2020, 6:36:21 AM8/27/20
to ecosystem-infra
This got me wondering about the other files we have in WPT's resources/chromium directory.

Grepping for e.g. contacts_manager_mock.js or mock-sms-receiver.js, it looks like there are other directories with their own loadChromiumResources() implementations that were already relying on *.mojom.js files from /gen/ while not shipping them in mojojs.zip before this work started. I guess they were just never expected to work with wptrunner? Are these files also being tracked by some wider effort to reduce duplication and get these tests to work outside the Chromium CI infrastructure?

Robert Ma

unread,
Aug 27, 2020, 9:20:18 AM8/27/20
to Raphael Kubo Da Costa, ecosystem-infra
On Thu, Aug 27, 2020 at 6:36 AM Raphael Kubo Da Costa <raphael.ku...@intel.com> wrote:
This got me wondering about the other files we have in WPT's resources/chromium directory.

Grepping for e.g. contacts_manager_mock.js or mock-sms-receiver.js, it looks like there are other directories with their own loadChromiumResources() implementations that were already relying on *.mojom.js files from /gen/ while not shipping them in mojojs.zip before this work started. I guess they were just never expected to work with wptrunner?

Yeah I think that was the case.
 
Are these files also being tracked by some wider effort to reduce duplication and get these tests to work outside the Chromium CI infrastructure?

Right, these need case-by-case investigation (some of them are unfortunately quite old without recent activities). I'll track this in https://crbug.com/1122581 . Thanks, Raphael!
 
Reply all
Reply to author
Forward
0 new messages