Lines Matching refs:should

37       .then(() => assert_array_equals(storage, input, 'correct data should be relayed to underlying sink'));
38 }, 'WritableStream should complete asynchronous writes before close resolves');
48 'correct data should be relayed to underlying sink'));
49 }, 'WritableStream should complete synchronous writes before close resolves');
63 }, 'fulfillment value of ws.write() call should be undefined even if the underlying sink returns a non-undefined ' +
78 assert_equals(writer.desiredSize, 1, 'desiredSize should be 1');
83 assert_not_equals(resolveSinkWritePromise, undefined, 'resolveSinkWritePromise should not be undefined');
85 assert_equals(writer.desiredSize, 0, 'desiredSize should be 0 after writer.write()');
90 assert_equals(resolveSinkWritePromise, undefined, 'sinkWritePromise should be fulfilled before writePromise');
92 assert_equals(value, undefined, 'writePromise should be fulfilled with undefined');
95 assert_equals(resolveSinkWritePromise, undefined, 'sinkWritePromise should be fulfilled before writer.ready');
96 assert_true(writePromiseResolved, 'writePromise should be fulfilled before writer.ready');
98 assert_equals(writer.desiredSize, 1, 'desiredSize should be 1 again');
100 assert_equals(value, undefined, 'writePromise should be fulfilled with undefined');
108 }, 'WritableStream should transition to waiting until write is acknowledged');
121 assert_equals(writer.desiredSize, 1, 'desiredSize should be 1');
125 assert_equals(sinkWritePromiseRejectors.length, 1, 'there should be 1 rejector');
126 assert_equals(writer.desiredSize, 0, 'desiredSize should be 0');
129 assert_equals(sinkWritePromiseRejectors.length, 1, 'there should be still 1 rejector');
130 assert_equals(writer.desiredSize, -1, 'desiredSize should be -1');
134 assert_equals(writer.desiredSize, -1, 'desiredSize should still be -1');
138 'closedPromise should reject with the error returned from the sink\'s write method')
140 'sinkWritePromise should reject before closedPromise')),
142 'writePromise should reject with the error returned from the sink\'s write method')
144 'sinkWritePromise should reject before writePromise')),
146 'writePromise2 should reject with the error returned from the sink\'s write method')
148 'sinkWritePromise should reject before writePromise2')),
155 }, 'when write returns a rejected promise, queued writes and close should be cleared');
167 'write() should reject with the error returned from the sink\'s write method')
168 .then(() => promise_rejects_js(t, TypeError, writer.close(), 'close() should be rejected'));
169 }, 'when sink\'s write throws an error, the stream should become errored and the promise should reject');
182 'write() should reject with the error returned from the sink\'s write method ')
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`));
226 }, 'a large queue of writes should be processed completely');
236 assert_array_equals(stream.events, ['write', 'a'], 'write() should be passed to sink');
238 }, 'WritableStreamDefaultWriter should work when manually constructed');
252 return ws.getWriter().write('a').then(() => assert_true(thenCalled, 'thenCalled should be true'));
253 }, 'returning a thenable from write() should work');
260 'should not be able to construct on locked stream');
264 }, 'failing DefaultWriter constructor should not release an existing writer');
274 promise_rejects_exactly(t, error1, writer.ready, 'ready should be rejected'),
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');
284 }, 'writing to a released writer should reject the returned promise');