Lines Matching refs:stream

3 // These tests can be run against any readable stream produced by the web platform that meets the given descriptions.
4 // For readable stream tests, the factory should return the stream. For reader tests, the factory should return a
5 // { stream, reader } object. (You can use this to vary the time at which you acquire a reader.)
137 const reader = rs.getReader(); // Calling getReader() twice does not throw (the stream is not locked).
203 const stream = factory().stream;
205 assert_true(stream.locked, 'locked getter should return true');
249 const stream = factory().stream;
250 assert_throws_js(TypeError, () => stream.getReader(), 'stream.getReader() should throw a TypeError');
252 }, label + ': getReader() again on the stream should fail');
257 const stream = streamAndReader.stream;
266 assert_false(stream.locked, 'the stream should be unlocked');
305 const stream = streamAndReader.stream;
309 assert_false(stream.locked, 'locked getter should return false');
326 const stream = factory().stream;
327 return promise_rejects_js(t, TypeError, stream.cancel());
329 }, label + ': canceling via the stream should fail');
504 'promise returned after cancellation should fulfill with an end-of-stream signal');
554 const stream = streamAndReader.stream;
557 assert_true(stream.locked, 'stream should start locked');
561 assert_true(stream.locked, 'stream should remain locked');
570 ': draining the stream via read() should cause the reader closed promise to fulfill, but locked stays true');
575 const stream = streamAndReader.stream;
579 assert_true(stream.locked, 'the stream should start locked');
581 assert_false(stream.locked, 'the stream should end unlocked');
589 }, label + ': releasing the lock after the stream is closed should cause locked to become false');
608 const stream = streamAndReader.stream;
622 const newReader = stream.getReader();
699 }, `${label}: failing to cancel the original stream should cause cancel() to reject on branches`);
705 const stream = factory({
711 const [branch1, branch2] = stream.tee();
719 }, `${label}: erroring a teed stream should properly handle canceled branches`);