Lines Matching refs:write
13 array.forEach(chunk => writableStreamWriter.write(chunk));
24 write(chunk) {
47 .then(() => assert_array_equals(ws.events, ['write', 1, 'write', 2, 'write', 3, 'write', 4, 'write', 5, 'close'],
53 write() {
60 const writePromise = writer.write('a');
63 }, 'fulfillment value of ws.write() call should be undefined even if the underlying sink returns a non-undefined ' +
69 write() {
81 const writePromise = writer.write('a');
85 assert_equals(writer.desiredSize, 0, 'desiredSize should be 0 after writer.write()');
108 }, 'WritableStream should transition to waiting until write is acknowledged');
113 write() {
124 const writePromise = writer.write('a');
128 const writePromise2 = writer.write('b');
138 'closedPromise should reject with the error returned from the sink\'s write method')
142 'writePromise should reject with the error returned from the sink\'s write method')
146 'writePromise2 should reject with the error returned from the sink\'s write method')
155 }, 'when write returns a rejected promise, queued writes and close should be cleared');
159 write() {
166 return promise_rejects_exactly(t, error1, writer.write('a'),
167 'write() should reject with the error returned from the sink\'s write method')
169 }, 'when sink\'s write throws an error, the stream should become errored and the promise should reject');
173 write(chunk, controller) {
181 return promise_rejects_exactly(t, error2, writer.write('a'),
182 'write() should reject with the error returned from the sink\'s write method ')
191 }, 'writer.write(), ready and closed reject with the error passed to controller.error() made before sink.write' +
200 write() {
214 writer.write('a');
216 const writePromise = writer.write('a');
218 assert_equals(writeCount, 1, 'should have called sink\'s write once');
224 assert_equals(writeCount, numberOfWrites, `should have called sink's write ${numberOfWrites} times`));
235 writer.write('a');
236 assert_array_equals(stream.events, ['write', 'a'], 'write() should be passed to sink');
243 write() {
252 return ws.getWriter().write('a').then(() => assert_true(thenCalled, 'thenCalled should be true'));
253 }, 'returning a thenable from write() should work');
275 promise_rejects_exactly(t, error1, writer.write(), 'write() should be rejected')
277 }, 'write() on a stream with HWM 0 should not cause the ready Promise to resolve');
283 return promise_rejects_js(t, TypeError, writer.write(), 'write should reject');