Add tests for modulepreload links with JSON and CSS, remove json with non-module preload#56617
Merged
yoavweiss merged 15 commits intoweb-platform-tests:masterfrom Jan 30, 2026
Conversation
Contributor
Author
|
@annevk FYI |
6 tasks
yoavweiss
reviewed
Dec 10, 2025
preload/modulepreload.html
Outdated
Contributor
There was a problem hiding this comment.
Should this be a utility function that accepts the different URLs and as values?
Contributor
Author
There was a problem hiding this comment.
Latest commit revamps this to take an array of module types for shared tests. That way we can have unique tests for each module type. This reduced a lot of duplication. It's not used everywhere because a lot of these tests are unique for script, but it'll make it much easier to expand for future module types like "text".
annevk
reviewed
Jan 13, 2026
Member
annevk
left a comment
There was a problem hiding this comment.
This looks good to me but it seems like it needs rebasing to get CI to be green.
chromium-wpt-export-bot
pushed a commit
that referenced
this pull request
Jan 30, 2026
Adds support for preloading JSON and CSS modules via the "as" parameter using the same fetching mechanism that script module preloads use. Basic tests are added in this CL, and more detailed tests are coming straight to WPT via #56617. Bug: 466888680 Change-Id: I3f08d7a1c48d4e46e500538b5fab32f2b4f41b02
chromium-wpt-export-bot
pushed a commit
that referenced
this pull request
Jan 30, 2026
Adds support for preloading JSON and CSS modules via the "as" parameter using the same fetching mechanism that script module preloads use. Basic tests are added in this CL, and more detailed tests are coming straight to WPT via #56617. Bug: 466888680 Change-Id: I3f08d7a1c48d4e46e500538b5fab32f2b4f41b02 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7216960 Reviewed-by: Dan Clark <daniec@microsoft.com> Commit-Queue: Kurt Catti-Schmidt <kschmi@microsoft.com> Reviewed-by: Yoav Weiss (@Shopify) <yoavweiss@chromium.org> Cr-Commit-Position: refs/heads/main@{#1577402}
jenkins-chromium-github-sync bot
pushed a commit
to armarok/chromium
that referenced
this pull request
Jan 30, 2026
Adds support for preloading JSON and CSS modules via the "as" parameter using the same fetching mechanism that script module preloads use. Basic tests are added in this CL, and more detailed tests are coming straight to WPT via web-platform-tests/wpt#56617. Bug: 466888680 Change-Id: I3f08d7a1c48d4e46e500538b5fab32f2b4f41b02 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7216960 Reviewed-by: Dan Clark <daniec@microsoft.com> Commit-Queue: Kurt Catti-Schmidt <kschmi@microsoft.com> Reviewed-by: Yoav Weiss (@Shopify) <yoavweiss@chromium.org> Cr-Commit-Position: refs/heads/main@{#1577402}
chromium-wpt-export-bot
pushed a commit
that referenced
this pull request
Jan 30, 2026
Adds support for preloading JSON and CSS modules via the "as" parameter using the same fetching mechanism that script module preloads use. Basic tests are added in this CL, and more detailed tests are coming straight to WPT via #56617. Bug: 466888680 Change-Id: I3f08d7a1c48d4e46e500538b5fab32f2b4f41b02 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7216960 Reviewed-by: Dan Clark <daniec@microsoft.com> Commit-Queue: Kurt Catti-Schmidt <kschmi@microsoft.com> Reviewed-by: Yoav Weiss (@Shopify) <yoavweiss@chromium.org> Cr-Commit-Position: refs/heads/main@{#1577402}
lando-prod-mozilla bot
pushed a commit
to mozilla-firefox/firefox
that referenced
this pull request
Feb 5, 2026
…nk type=modulepreload, a=testonly Automatic update from web-platform-tests [CSS Modules] Support JSON and CSS in <link type=modulepreload> Adds support for preloading JSON and CSS modules via the "as" parameter using the same fetching mechanism that script module preloads use. Basic tests are added in this CL, and more detailed tests are coming straight to WPT via web-platform-tests/wpt#56617. Bug: 466888680 Change-Id: I3f08d7a1c48d4e46e500538b5fab32f2b4f41b02 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7216960 Reviewed-by: Dan Clark <daniec@microsoft.com> Commit-Queue: Kurt Catti-Schmidt <kschmi@microsoft.com> Reviewed-by: Yoav Weiss (@Shopify) <yoavweiss@chromium.org> Cr-Commit-Position: refs/heads/main@{#1577402} -- wpt-commits: f0705a47664fcbabfc0410431d5e40efdccd65e7 wpt-pr: 57436
ajperel
pushed a commit
to chromium/chromium
that referenced
this pull request
Feb 12, 2026
This test has been disabled for some time due to flakiness. The flakiness was addressed directly in WPT via web-platform-tests/wpt#56617. This change removes it from TestExpecations and adds a -expected.txt as it is failing for other reasons (which will be addressed separately). I ran locally 100 times and it never failed. Bug: 466888680 Change-Id: Ib86d8a75067bd4ee4fd1dfa1c1b138fa2d3c612f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7568243 Commit-Queue: Kurt Catti-Schmidt <kschmi@microsoft.com> Reviewed-by: Dan Clark <daniec@microsoft.com> Cr-Commit-Position: refs/heads/main@{#1583602}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per whatwg/html#10233, "json" and "style" should be supported for modulepreload. This PR adds tests for this.
In the PR to update the HTML5 spec for these changes, it was also recommended that support for non-module JSON preloads be removed, as it only makes sense in a module context. This change also updates tests for that scenario.
The existing tests had a flakiness problem that this change addressed in order to satisfy the "unstable results" bots. Specifically,
modulepreload-as.htmlwas modified fairly substantially. It no longer checksperformance.getEntriesByName, as the preload scanner was fetching the files and firing events, but the performance entries were not always getting updated in time for the test. Now, the test only checks for events fired, as that is all we can determine consistently at test time. The event handlers were also moved to markup, which avoids a race between the preload scanner fetching the files and the event handlers being added.