Skip to content

Commit 0b7f022

Browse files
committed
Bug 1721499 [wpt PR 29723] - Streams: add tests for ReadableStreamBYOBReader.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
1 parent 7313920 commit 0b7f022

File tree

4 files changed

+7218
-417
lines changed

4 files changed

+7218
-417
lines changed

testing/web-platform/tests/streams/piping/general.any.js

+30-22
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,6 @@ script
1818
/
1919
resources
2020
/
21-
test
22-
-
23-
utils
24-
.
25-
js
26-
/
27-
/
28-
META
29-
:
30-
script
31-
=
32-
.
33-
.
34-
/
35-
resources
36-
/
3721
recording
3822
-
3923
streams
@@ -275,20 +259,32 @@ WritableStream
275259
)
276260
;
277261
return
278-
methodRejects
262+
promise_rejects_js
279263
(
280264
t
265+
TypeError
281266
ReadableStream
282267
.
283268
prototype
284-
'
269+
.
285270
pipeTo
286-
'
271+
.
272+
apply
273+
(
287274
fakeRS
288275
[
289276
ws
290277
]
291278
)
279+
'
280+
pipeTo
281+
should
282+
reject
283+
with
284+
a
285+
TypeError
286+
'
287+
)
292288
;
293289
}
294290
'
@@ -332,20 +328,32 @@ prototype
332328
)
333329
;
334330
return
335-
methodRejects
331+
promise_rejects_js
336332
(
337333
t
334+
TypeError
338335
ReadableStream
339336
.
340337
prototype
341-
'
338+
.
342339
pipeTo
343-
'
340+
.
341+
apply
342+
(
344343
rs
345344
[
346345
fakeWS
347346
]
348347
)
348+
'
349+
pipeTo
350+
should
351+
reject
352+
with
353+
a
354+
TypeError
355+
'
356+
)
349357
;
350358
}
351359
'

testing/web-platform/tests/streams/readable-byte-streams/non-transferable-buffers.any.js

+114
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,120 @@ buffer
126126
'
127127
)
128128
;
129+
promise_test
130+
(
131+
async
132+
t
133+
=
134+
>
135+
{
136+
const
137+
rs
138+
=
139+
new
140+
ReadableStream
141+
(
142+
{
143+
pull
144+
:
145+
t
146+
.
147+
unreached_func
148+
(
149+
'
150+
pull
151+
(
152+
)
153+
should
154+
not
155+
be
156+
called
157+
'
158+
)
159+
type
160+
:
161+
'
162+
bytes
163+
'
164+
}
165+
)
166+
;
167+
const
168+
reader
169+
=
170+
rs
171+
.
172+
getReader
173+
(
174+
{
175+
mode
176+
:
177+
'
178+
byob
179+
'
180+
}
181+
)
182+
;
183+
const
184+
memory
185+
=
186+
new
187+
WebAssembly
188+
.
189+
Memory
190+
(
191+
{
192+
initial
193+
:
194+
1
195+
}
196+
)
197+
;
198+
const
199+
view
200+
=
201+
new
202+
Uint8Array
203+
(
204+
memory
205+
.
206+
buffer
207+
0
208+
1
209+
)
210+
;
211+
await
212+
promise_rejects_js
213+
(
214+
t
215+
TypeError
216+
reader
217+
.
218+
fill
219+
(
220+
view
221+
)
222+
)
223+
;
224+
}
225+
'
226+
ReadableStream
227+
with
228+
byte
229+
source
230+
:
231+
fill
232+
(
233+
)
234+
with
235+
a
236+
non
237+
-
238+
transferable
239+
buffer
240+
'
241+
)
242+
;
129243
test
130244
(
131245
t

0 commit comments

Comments
 (0)