Skip to content

Commit

Permalink
Bug 1721499 [wpt PR 29723] - Streams: add tests for ReadableStreamBYO…
Browse files Browse the repository at this point in the history
…BReader.read(view, { min }), a=testonly

Automatic update from web-platform-tests
Streams: add tests for ReadableStreamBYOBReader read(view, { min })

Follows whatwg/streams#1145.
--

wpt-commits: 7eaf605c38d80377c717828376deabad86b702b2
wpt-pr: 29723

UltraBlame original commit: 820875020074b1b3ca04fde919a52f2fd580bbbb
  • Loading branch information
marco-c committed Nov 30, 2023
1 parent 48e1b22 commit 6b120e2
Show file tree
Hide file tree
Showing 4 changed files with 7,152 additions and 401 deletions.
36 changes: 30 additions & 6 deletions testing/web-platform/tests/streams/piping/general.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,20 +234,32 @@ WritableStream
)
;
return
methodRejects
promise_rejects_js
(
t
TypeError
ReadableStream
.
prototype
'
.
pipeTo
'
.
apply
(
fakeRS
[
ws
]
)
'
pipeTo
should
reject
with
a
TypeError
'
)
;
}
'
Expand Down Expand Up @@ -291,20 +303,32 @@ prototype
)
;
return
methodRejects
promise_rejects_js
(
t
TypeError
ReadableStream
.
prototype
'
.
pipeTo
'
.
apply
(
rs
[
fakeWS
]
)
'
pipeTo
should
reject
with
a
TypeError
'
)
;
}
'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,120 @@ buffer
'
)
;
promise_test
(
async
t
=
>
{
const
rs
=
new
ReadableStream
(
{
pull
:
t
.
unreached_func
(
'
pull
(
)
should
not
be
called
'
)
type
:
'
bytes
'
}
)
;
const
reader
=
rs
.
getReader
(
{
mode
:
'
byob
'
}
)
;
const
memory
=
new
WebAssembly
.
Memory
(
{
initial
:
1
}
)
;
const
view
=
new
Uint8Array
(
memory
.
buffer
0
1
)
;
await
promise_rejects_js
(
t
TypeError
reader
.
fill
(
view
)
)
;
}
'
ReadableStream
with
byte
source
:
fill
(
)
with
a
non
-
transferable
buffer
'
)
;
test
(
t
Expand Down
Loading

0 comments on commit 6b120e2

Please sign in to comment.