Auto merge of #25561 - pshaughn:formdata-same-file, r=jdm

Make File objects roundtrip through FormData

FormData.append now only creates a new File object if it needs to file-wrap a blob or set a filename, and not when appending an existing File with no filename override. The hardest part here was reading the specification in a way that matched browser behavior.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #24939

- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
bors-servo 2020-01-24 09:48:55 -05:00 committed by GitHub
commit 0bd995cdf5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 14 deletions

View file

@ -1,11 +0,0 @@
[formdata-foreach.html]
type: testharness
[Iterator should return duplicate keys and non-deleted values]
expected: FAIL
[Entries iterator should return duplicate keys and non-deleted values]
expected: FAIL
[Values iterator should return non-deleted values]
expected: FAIL