Closed
Bug 1444166
Opened 7 years ago
Closed 7 years ago
[wpt-sync] Sync PR 9931 - Add used body replacement test for Request constructor
Categories
(Core :: DOM: Core & HTML, enhancement, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla61
| Tracking | Status | |
|---|---|---|
| firefox61 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 9931 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/w3c/web-platform-tests/pull/9931
Details from upstream follow.
Harris Hancock wrote:
> Add used body replacement test for Request constructor
>
> This is a WPT companion PR for a Fetch spec change: https://github.com/whatwg/fetch/pull/675. That change allows this currently throwy code snippet to function as expected:
>
> ```js
> let request = new Request(url, { method: "POST", body: "foo" })
> await request.text() // disturb the body
>
> // currently throws because request is disturbed,
> // even thought we're providing a new body
> request = new Request(request, { body: "bar" })
> ```
>
> I tested this on Chrome and Epiphany Tech Preview. As expected, it fails on both because: Chrome does not implement `request.body`, and EPT implements the spec as currently written.
>
> /cc @yutakahirano, @annevk
| Reporter | ||
Updated•7 years ago
|
Component: web-platform-tests → DOM
Product: Testing → Core
| Reporter | ||
Comment 1•7 years ago
|
||
| Reporter | ||
Comment 2•7 years ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=f73276b2e761e241eab5f3a9b4c89bd6d8fee74e
| Reporter | ||
Comment 3•7 years ago
|
||
Ran 1 tests and 9 subtests
OK : 1
PASS : 4
FAIL : 5
New tests that have failures or other problems:
/fetch/api/request/request-disturbed.html
Check creating a new request with a new body from a disturbed request: FAIL
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ad7b8e6c3816
[wpt PR 9931] - Add used body replacement test for Request constructor, a=testonly
Comment 5•7 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Comment 6•7 years ago
|
||
| bugherder | ||
| Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•