Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
431 changes: 429 additions & 2 deletions builtins/web/fetch/request-response.cpp

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions builtins/web/fetch/request-response.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ class Response final : public BuiltinImpl<Response> {

static bool redirect(JSContext *cx, unsigned argc, JS::Value *vp);
static bool json(JSContext *cx, unsigned argc, JS::Value *vp);
static bool clone(JSContext *cx, unsigned argc, JS::Value *vp);

public:
static constexpr const char *class_name = "Response";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"status": "PASS"
},
"Request is still 'used' if signal is aborted before fetching": {
"status": "FAIL"
"status": "PASS"
},
"response.arrayBuffer() rejects if already aborted": {
"status": "PASS"
Expand Down Expand Up @@ -147,7 +147,7 @@
"status": "FAIL"
},
"Stream will not error if body is empty. It's closed with an empty queue before it errors.": {
"status": "FAIL"
"status": "PASS"
},
"Readable stream synchronously cancels with AbortError if aborted before reading": {
"status": "PASS"
Expand All @@ -158,4 +158,4 @@
"Clone aborts with original controller": {
"status": "PASS"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"Request: overriding explicit Content-Type": {
"status": "FAIL"
},
"Response: overriding explicit Content-Type": {
"status": "FAIL"
},
"Request: removing implicit Content-Type": {
"status": "PASS"
},
"Response: removing implicit Content-Type": {
"status": "PASS"
},
"Request: setting missing Content-Type": {
"status": "FAIL"
},
"Response: setting missing Content-Type": {
"status": "FAIL"
},
"Request: MIME type for Blob from empty body": {
"status": "PASS"
},
"Response: MIME type for Blob from empty body": {
"status": "PASS"
},
"Request: MIME type for Blob from empty body with Content-Type": {
"status": "FAIL"
},
"Response: MIME type for Blob from empty body with Content-Type": {
"status": "FAIL"
},
"Request: MIME type for Blob": {
"status": "PASS"
},
"Response: MIME type for Blob": {
"status": "PASS"
},
"Request: MIME type for Blob with non-empty type": {
"status": "FAIL"
},
"Response: MIME type for Blob with non-empty type": {
"status": "FAIL"
},
"Request: Extract a MIME type with clone": {
"status": "FAIL"
},
"Response: Extract a MIME type with clone": {
"status": "FAIL"
},
"Request: Content-Type in headers wins Blob\"s type": {
"status": "FAIL"
},
"Response: Content-Type in headers wins Blob\"s type": {
"status": "FAIL"
},
"Request: setting missing Content-Type in headers and it wins Blob\"s type": {
"status": "FAIL"
},
"Response: setting missing Content-Type in headers and it wins Blob\"s type": {
"status": "FAIL"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"status": "PASS"
},
"Input request used for creating new request became disturbed": {
"status": "FAIL"
"status": "PASS"
},
"Input request used for creating new request became disturbed even if body is not used": {
"status": "FAIL"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"Check Response's clone with default values, without body": {
"status": "PASS"
},
"Check Response's clone has the expected attribute values": {
"status": "PASS"
},
"Check orginal response's body after cloning": {
"status": "PASS"
},
"Check cloned response's body": {
"status": "PASS"
},
"Cannot clone a disturbed response": {
"status": "PASS"
},
"Cloned responses should provide the same data": {
"status": "PASS"
},
"Cancelling stream should not affect cloned one": {
"status": "PASS"
},
"Check response clone use structureClone for teed ReadableStreams (Int8Arraychunk)": {
"status": "PASS"
},
"Check response clone use structureClone for teed ReadableStreams (Int16Arraychunk)": {
"status": "PASS"
},
"Check response clone use structureClone for teed ReadableStreams (Int32Arraychunk)": {
"status": "PASS"
},
"Check response clone use structureClone for teed ReadableStreams (ArrayBufferchunk)": {
"status": "PASS"
},
"Check response clone use structureClone for teed ReadableStreams (Uint8Arraychunk)": {
"status": "PASS"
},
"Check response clone use structureClone for teed ReadableStreams (Uint8ClampedArraychunk)": {
"status": "PASS"
},
"Check response clone use structureClone for teed ReadableStreams (Uint16Arraychunk)": {
"status": "PASS"
},
"Check response clone use structureClone for teed ReadableStreams (Uint32Arraychunk)": {
"status": "PASS"
},
"Check response clone use structureClone for teed ReadableStreams (BigInt64Arraychunk)": {
"status": "PASS"
},
"Check response clone use structureClone for teed ReadableStreams (BigUint64Arraychunk)": {
"status": "PASS"
},
"Check response clone use structureClone for teed ReadableStreams (Float16Arraychunk)": {
"status": "PASS"
},
"Check response clone use structureClone for teed ReadableStreams (Float32Arraychunk)": {
"status": "PASS"
},
"Check response clone use structureClone for teed ReadableStreams (Float64Arraychunk)": {
"status": "PASS"
},
"Check response clone use structureClone for teed ReadableStreams (DataViewchunk)": {
"status": "PASS"
}
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"A non-closed stream on which read() has been called": {
"status": "FAIL"
"status": "PASS"
},
"A non-closed stream on which cancel() has been called": {
"status": "FAIL"
"status": "PASS"
},
"A closed stream on which read() has been called": {
"status": "FAIL"
"status": "PASS"
},
"An errored stream on which read() has been called": {
"status": "FAIL"
"status": "PASS"
},
"An errored stream on which cancel() has been called": {
"status": "FAIL"
"status": "PASS"
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"using pipeTo on Response body should disturb it synchronously": {
"status": "FAIL"
"status": "PASS"
},
"using pipeThrough on Response body should disturb it synchronously": {
"status": "FAIL"
"status": "PASS"
}
}
Loading