Lines Matching refs:write
21 writer.write('a');
22 assert_equals(writer.desiredSize, 0, 'desiredSize should be 0 after writer.write()');
24 // Wait and verify that write isn't called.
27 assert_array_equals(ws.events, [], 'write should not be called until start promise resolves');
31 .then(() => assert_array_equals(ws.events, ['write', 'a'],
32 'write should not be called until start promise resolves'));
33 }, 'underlying sink\'s write should not be called until start finishes');
50 // Wait and verify that write isn't called.
70 write() {
78 assert_false(writeCalled, 'write should not be called');
80 }, 'underlying sink\'s write or close should not be called if start throws');
89 // Wait and verify that write or close aren't called.
91 .then(() => assert_array_equals(ws.events, [], 'write and close should not be called'));
92 }, 'underlying sink\'s write or close should not be invoked if the promise returned by start is rejected');
111 return promise_rejects_exactly(t, error1, ws.getWriter().write('a'), 'write() should reject with the error')
113 assert_array_equals(ws.events, [], 'sink write() should not have been called');
129 const writePromise = writer.write('a');
134 promise_rejects_exactly(t, error1, writePromise, 'write() should fail'),
137 assert_array_equals(ws.events, [], 'sink write() and close() should not have been called');
158 catchAndRecord(writer.write(), 'write');
161 assert_array_equals(events, ['ready', 'write', 'closed'], 'promises should reject in standard order');