Safari TP Version: 14.2 OS Version: OS X 10.15.7 Safari: FAIL Firefox: OK IE/Edge: FAIL What steps will reproduce the problem? 1. new Response(new FormData()).formData() What is the expected result? Get back a empty formdata... It can work if you append at least one item into the FormData. What happens instead of that? TypeError: Type error https://github.com/web-platform-tests/wpt/issues/28607 (plz, switch to github issues instead of using bugzilla)
Created attachment 427594 [details] Patch
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
@Jimmy, I added two of these lines to your test to verify it returns a FormData that is indeed empty: for (const pair of fd.entries()) { assert_true(false); } You may consider this in your upstream PR. Also, I removed an extra one space indent that crept into all but one line of your test.
Comment on attachment 427594 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=427594&action=review > LayoutTests/imported/w3c/web-platform-tests/fetch/api/body/formdata.any.js:5 > + for (const pair of fd.entries()) { assert_true(false); } assert_unreached would be clearer. > LayoutTests/imported/w3c/web-platform-tests/fetch/api/body/formdata.any.js:15 > + for (const pair of fd.entries()) { assert_true(false); } Ditto here.
<rdar://problem/77663677>
I think this didn't landed yet despite r+ because Safari still fail these tests (matched from within patch to WPT): https://wpt.fyi/results/fetch/api/body?label=master&label=experimental&aligned&view=subtest&q=formdata Please ignore my comment, if I am wrong. Thanks!
Pull request: https://github.com/WebKit/WebKit/pull/2956
Committed 253047@main (0cd625839811): <https://commits.webkit.org/253047@main> Reviewed commits have been landed. Closing PR #2956 and removing active labels.