PSA: Blink's //webexposed tests are moving to //http/tests/webexposed.

44 views
Skip to first unread message

Mike West

unread,
Jul 7, 2021, 3:18:23 AM7/7/21
to blink-dev
Hey folks!

The tests which verify the set of APIs Blink exposed to the web are moving from //third-party/blink/web_tests/webexposed to //third_party/blink/web_tests/http/tests/webexposed, and they're shifting from HTML to PHP. I appreciate your patience if you need to update in-flight CLs.

I'm moving these tests to support IDL's `[CrossOriginIsolated]` extended attribute, which requires pages to opt-into cross-origin isolation via Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy headers. As our webexposed tests are currently served from `file:`, this isn't possible. Moving them to the `http/tests` directory means they'll be served from an HTTP server instead, which provides the flexibility we need to send headers. This move will happen in https://chromium-review.googlesource.com/c/chromium/src/+/3008415.

Since the `http/tests` directory doesn't support WPT niceties like `.headers` sidecar files, we also need to shift the `global-*` tests from HTML to PHP so we can emit the relevant headers. This will happen in https://chromium-review.googlesource.com/c/chromium/src/+/3008614.

Thanks!

-mike

Victor Costan

unread,
Jul 8, 2021, 7:17:54 PM7/8/21
to Mike West, blink-dev
(Apologies, I'm probably missing something obvious.)
I think that web_tests/wpt_internal is served using the WPT server. Would moving the tests to web_tests/wpt_internal/webexposed allow us to skip converting tests to PHP?

Thank you in advance for explaining!
    Victor
 

Thanks!

-mike

--
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/CAKXHy%3DdvAH-53HVkK3BmbtFVZL99bRZeug2Ur4gYArS0-e_1fA%40mail.gmail.com.

Mike West

unread,
Jul 9, 2021, 2:14:11 AM7/9/21
to Victor Costan, blink-dev
On Fri, Jul 9, 2021 at 1:17 AM Victor Costan <pwn...@chromium.org> wrote:
Since the `http/tests` directory doesn't support WPT niceties like `.headers` sidecar files, we also need to shift the `global-*` tests from HTML to PHP so we can emit the relevant headers. This will happen in https://chromium-review.googlesource.com/c/chromium/src/+/3008614.

I think that web_tests/wpt_internal is served using the WPT server. Would moving the tests to web_tests/wpt_internal/webexposed allow us to skip converting tests to PHP?

That would totally have worked! However, these tests aren't written using WPT-style `testharness.js`, but the (much) older `js-test.js`, and I wasn't particularly keen on  copying `js-test.js` to a WPT-accessible directory, or porting the tests to `testharness.js`. Moving them was the smallest change I could make that allowed exposure of [CrossOriginIsolated] interfaces.

That said, if someone's interested in doing that work, I'll happily review it!

-mike

Mike West

unread,
Jul 13, 2021, 3:08:43 AM7/13/21
to Victor Costan, blink-dev
Hey folks,

Unfortunately, this change breaks in WebView's infrastructure, which doesn't run layout tests via an HTTP server (see https://bugs.chromium.org/p/chromium/issues/detail?id=1206656#c8). I've put up https://chromium-review.googlesource.com/c/chromium/src/+/3021190 to revert the change while I work that out with them.

My apologies for the churn. :(

-mike

Reply all
Reply to author
Forward
0 new messages