Repository navigation
Add the WPT xhr/formdata suite - #8523
Merged
Merged
Conversation
The xhr/formdata *.any.js files test FormData itself and need no XMLHttpRequest, but workerd did not run them. In this patch src/wpt gains a wpt_test for @wpt//:xhr/formdata. Seven of the nine files pass. Four cases are marked as expected failures, each with the reason: the FormData constructor accepts any argument instead of throwing a TypeError, a Blob added without a filename is named after the entry instead of "blob", and a File added with a new filename loses its lastModified.
There was a problem hiding this comment.
✅ Approved — This adds WPT coverage for FormData without changing the runtime, and each expected failure states a reason that matches the current code. I found no issues.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
📋 Code Quality: ✅ LGTM
The new wpt_test target and xhr/formdata-test.ts config follow the conventions the existing WPT suites use. Each expected failure has a comment, and each comment matches what the runtime does now.
📝 Documentation: ✅ LGTM
Each expected failure's comment describes what the runtime does now. No documentation changes are needed.
Reviewed commit: b2ed4948
npaun
approved these changes
Nov 17, 2026
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.
The
xhr/formdata*.any.jsfiles test FormData itself and need no XMLHttpRequest, but workerd did not run them.In this patch
src/wptgains awpt_testfor@wpt//:xhr/formdata. Seven of the nine files pass. Four cases are marked as expected failures, each with the reason:new FormData(null)andnew FormData("string")don't throw a TypeError."blob-1") instead of"blob".lastModified.These are runtime behaviour changes, so they are left for separate patches.