Lines Matching refs:should
67 assert_true(startCalledBeforePull, 'start should be called before pull');
68 assert_equals(desiredSize, 256, 'desiredSize should equal highWaterMark');
118 pull: t.unreached_func('pull() should not be called'),
180 pull: t.unreached_func('pull() should not be called'),
196 pull: t.unreached_func('pull() should not be called'),
212 pull: t.unreached_func('pull() should not be called'),
228 pull: t.unreached_func('pull() should not be called'),
360 assert_equals(viewInfo.constructor, Uint8Array, 'first view.constructor should be Uint8Array');
361 assert_equals(viewInfo.bufferByteLength, 16, 'first view.buffer.byteLength should be 16');
362 assert_equals(viewInfo.byteOffset, 0, 'first view.byteOffset should be 0');
363 assert_equals(viewInfo.byteLength, 16, 'first view.byteLength should be 16');
369 assert_not_equals(value, undefined, 'first read should have a value');
370 assert_equals(value.constructor, Uint8Array, 'first value should be a Uint8Array');
371 assert_equals(value.buffer.byteLength, 16, 'first value.buffer.byteLength should be 16');
372 assert_equals(value.byteOffset, 0, 'first value.byteOffset should be 0');
373 assert_equals(value.byteLength, 1, 'first value.byteLength should be 1');
374 assert_equals(value[0], 0x01, 'first value[0] should be 0x01');
379 assert_equals(viewInfo.constructor, Uint8Array, 'second view.constructor should be Uint8Array');
380 assert_equals(viewInfo.bufferByteLength, 16, 'second view.buffer.byteLength should be 16');
381 assert_equals(viewInfo.byteOffset, 0, 'second view.byteOffset should be 0');
382 assert_equals(viewInfo.byteLength, 16, 'second view.byteLength should be 16');
386 assert_equals(pullCount, 2, 'pull() should only be invoked twice');
388 assert_not_equals(value, undefined, 'second read should have a value');
389 assert_equals(value.constructor, Uint8Array, 'second value should be a Uint8Array');
390 assert_equals(value.buffer.byteLength, 16, 'second value.buffer.byteLength should be 16');
391 assert_equals(value.byteOffset, 0, 'second value.byteOffset should be 0');
392 assert_equals(value.byteLength, 2, 'second value.byteLength should be 2');
393 assert_equals(value[0], 0x02, 'second value[0] should be 0x02');
394 assert_equals(value[1], 0x03, 'second value[1] should be 0x03');
435 assert_not_equals(value, undefined, 'first read should have a value');
436 assert_equals(value.constructor, Uint8Array, 'first value should be a Uint8Array');
437 assert_equals(value.buffer.byteLength, 16, 'first value.buffer.byteLength should be 16');
438 assert_equals(value.byteOffset, 0, 'first value.byteOffset should be 0');
439 assert_equals(value.byteLength, 1, 'first value.byteLength should be 1');
440 assert_equals(value[0], 0x01, 'first value[0] should be 0x01');
445 assert_equals(viewInfo.constructor, Uint8Array, 'first view.constructor should be Uint8Array');
446 assert_equals(viewInfo.bufferByteLength, 16, 'first view.buffer.byteLength should be 16');
447 assert_equals(viewInfo.byteOffset, 0, 'first view.byteOffset should be 0');
448 assert_equals(viewInfo.byteLength, 16, 'first view.byteLength should be 16');
455 assert_not_equals(value, undefined, 'second read should have a value');
456 assert_equals(value.constructor, Uint8Array, 'second value should be a Uint8Array');
457 assert_equals(value.buffer.byteLength, 32, 'second value.buffer.byteLength should be 32');
458 assert_equals(value.byteOffset, 0, 'second value.byteOffset should be 0');
459 assert_equals(value.byteLength, 2, 'second value.byteLength should be 2');
460 assert_equals(value[0], 0x02, 'second value[0] should be 0x02');
461 assert_equals(value[1], 0x03, 'second value[1] should be 0x03');
466 assert_equals(viewInfo.constructor, Uint8Array, 'second view.constructor should be Uint8Array');
467 assert_equals(viewInfo.bufferByteLength, 32, 'second view.buffer.byteLength should be 32');
468 assert_equals(viewInfo.byteOffset, 0, 'second view.byteOffset should be 0');
469 assert_equals(viewInfo.byteLength, 32, 'second view.byteLength should be 32');
470 assert_equals(pullCount, 2, 'pullCount should be 2');
528 assert_equals(pullCount, 1, 'The first pull() should be made on read()');
574 }), 'constructor should throw');
606 pull: t.unreached_func('pull() should not be called'),
646 pull: t.unreached_func('pull() should not be called'),
675 pull: t.unreached_func('pull() should not be called'),
765 assert_equals(byobRequest, null, 'byobRequest should be null');
766 assert_equals(desiredSizes[0], 0, 'desiredSize on pull should be 0');
767 assert_equals(desiredSizes[1], 0, 'desiredSize after 1st enqueue() should be 0');
768 assert_equals(desiredSizes[2], 0, 'desiredSize after 2nd enqueue() should be 0');
769 assert_equals(pullCount, 1, 'pull() should only be called once');
814 assert_equals(byobRequest, null, 'byobRequest should be null');
815 assert_equals(desiredSizes[0], 256, 'desiredSize on pull should be 256');
816 assert_equals(desiredSizes[1], 256, 'desiredSize after 1st enqueue() should be 256');
817 assert_equals(desiredSizes[2], 256, 'desiredSize after 2nd enqueue() should be 256');
818 assert_equals(desiredSizes[3], 256, 'desiredSize after 3rd enqueue() should be 256');
855 assert_equals(pullCount, 1, 'pull() should be called only once');
895 assert_equals(pullCount, 1, 'pull() should be called only once');
928 assert_true(byobRequestWasDefined, 'byobRequest should be non-null');
979 assert_equals(viewInfo.constructor, Uint8Array, 'view.constructor should be Uint8Array');
980 assert_equals(viewInfo.bufferByteLength, 4, 'view.buffer.byteLength should be 4');
981 assert_equals(viewInfo.byteOffset, 0, 'view.byteOffset should be 0');
982 assert_equals(viewInfo.byteLength, 4, 'view.byteLength should be 4');
1002 pull: t.unreached_func('pull() should not be called'),
1028 pull: t.unreached_func('pull() should not be called'),
1044 assert_equals(reason, passedReason, 'reason should equal the passed reason');
1058 pull: t.unreached_func('pull() should not be called'),
1074 assert_equals(reason, passedReason, 'reason should equal the passed reason');
1090 pull: t.unreached_func('pull() should not be called'),
1111 assert_equals(result, undefined, 'cancel() return value should be fulfilled with undefined');
1112 assert_equals(cancelCount, 1, 'cancel() should be called only once');
1113 assert_equals(reason, passedReason, 'reason should equal the passed reason');
1152 assert_equals(pullCount, 1, '1 pull() should have been made in response to partial fill by enqueue()');
1153 assert_not_equals(byobRequest, null, 'byobRequest should not be null');
1154 assert_equals(viewInfos[0].byteLength, 2, 'byteLength before enqueue() should be 2');
1155 assert_equals(viewInfos[1].byteLength, 1, 'byteLength after enqueue() should be 1');
1159 assert_equals(pullCount, 1, 'pull() should only be called once');
1346 assert_equals(viewInfo.constructor, Uint8Array, 'view.constructor should be Uint8Array');
1347 assert_equals(viewInfo.bufferByteLength, 2, 'view.buffer.byteLength should be 2');
1348 assert_equals(viewInfo.byteOffset, 1, 'view.byteOffset should be 1');
1349 assert_equals(viewInfo.byteLength, 1, 'view.byteLength should be 1');
1420 assert_equals(viewInfo.constructor, Uint8Array, 'view.constructor should be Uint8Array');
1421 assert_equals(viewInfo.bufferByteLength, 2, 'view.buffer.byteLength should be 2');
1422 assert_equals(viewInfo.byteOffset, 1, 'view.byteOffset should be 1');
1423 assert_equals(viewInfo.byteLength, 1, 'view.byteLength should be 1');
1424 assert_equals(desiredSize, 0, 'desiredSize should be zero');
1441 pull: t.unreached_func('pull() should not be called'),
1449 .then(() => promise_rejects_js(t, TypeError, reader.closed, 'reader.closed should reject'));
1464 pull: t.unreached_func('pull() should not be called'),
1557 assert_equals(viewInfo.constructor, Uint8Array, 'view.constructor should be Uint8Array');
1558 assert_equals(viewInfo.bufferByteLength, 16, 'view.buffer.byteLength should be 16');
1559 assert_equals(viewInfo.byteOffset, 0, 'view.byteOffset should be 0');
1560 assert_equals(viewInfo.byteLength, 16, 'view.byteLength should be 16');
1604 assert_equals(pullCount, 1, 'pull() should only be called once');
1607 assert_equals(viewInfos[i].constructor, Uint8Array, 'view.constructor should be Uint8Array');
1608 assert_equals(viewInfos[i].bufferByteLength, 4, 'view.buffer.byteLength should be 4');
1610 assert_equals(viewInfos[i].byteOffset, i, 'view.byteOffset should be i');
1611 assert_equals(viewInfos[i].byteLength, 4 - i, 'view.byteLength should be 4 - i');
1613 assert_equals(viewInfosAfterRespond[i].bufferByteLength, 0, 'view.buffer should be transferred after respond()');
1657 assert_equals(pullCount, 1, 'pull() should only be called once');
1660 assert_equals(viewInfos[i].constructor, Uint8Array, 'view.constructor should be Uint8Array');
1661 assert_equals(viewInfos[i].bufferByteLength, 4, 'view.buffer.byteLength should be 4');
1663 assert_equals(viewInfos[i].byteOffset, i, 'view.byteOffset should be i');
1664 assert_equals(viewInfos[i].byteLength, 4 - i, 'view.byteLength should be 4 - i');
1666 assert_equals(viewInfosAfterEnqueue[i].bufferByteLength, 0, 'view.buffer should be transferred after enqueue()');
1708 assert_equals(pullCount, 0, 'No pull should have been made since the startPromise has not yet been handled');
1724 assert_equals(pullCount, 0, 'No pull should have been made since the startPromise has not yet been handled');
1728 assert_equals(pullCount, 0, 'No pull should have been made since the startPromise has not yet been handled');
1740 pull: t.unreached_func('pull() should not be called'),
1777 pull: t.unreached_func('pull() should not be called'),
1813 pull: t.unreached_func('pull() should not be called'),
1884 pull: t.unreached_func('pull() should not be called'),
1917 pull: t.unreached_func('pull() should not be called'),
2041 assert_throws_js(TypeError, () => byobRequest.respond(4), 'respond() should throw a TypeError');
2043 }, 'calling respond() twice on the same byobRequest should throw');
2058 'respondWithNewView() should throw a TypeError');
2060 }, 'calling respondWithNewView() twice on the same byobRequest should throw');
2090 assert_throws_js(TypeError, () => byobRequest.respond(0), 'respond() should throw');
2093 }, 'calling respond(0) twice on the same byobRequest should throw even when closed');
2120 assert_throws_js(TypeError, () => byobRequest.respond(0), 'respond() should throw');
2124 }, 'calling respond() should throw when canceled');
2147 await promise_rejects_js(t, TypeError, read, 'pending read should reject');
2148 }, 'pull() resolving should not resolve read()');
2206 }), 'constructor should throw for size function');
2210 'constructor should throw when strategy is CountQueuingStrategy');
2214 'constructor should throw when strategy is ByteLengthQueuingStrategy');
2221 'constructor should throw when size on the prototype chain');
2222 }, 'ReadableStream constructor should not accept a strategy with a size defined if type is "bytes"');
2385 // read(view) should work after discarding the auto-allocated BYOB request
2421 assert_not_equals(byobRequest1, null, 'first byobRequest should exist');
2424 // releaseLock() should reject the pending read, but *not* invalidate the BYOB request
2428 assert_not_equals(controller.byobRequest, null, 'byobRequest should not be invalidated after releaseLock()');
2429 assert_equals(controller.byobRequest, byobRequest1, 'byobRequest should be unchanged');
2430 assert_array_equals([...new Uint8Array(byobRequest1.view.buffer)], [1, 2, 3], 'byobRequest.view.buffer should be unchanged');
2433 // respond() should fulfill the *second* read() request
2437 assert_equals(byobRequest2, null, 'byobRequest should be null after respond()');
2458 assert_not_equals(byobRequest1, null, 'first byobRequest should exist');
2461 // releaseLock() should reject the pending read, but *not* invalidate the BYOB request
2465 assert_not_equals(controller.byobRequest, null, 'byobRequest should not be invalidated after releaseLock()');
2466 assert_equals(controller.byobRequest, byobRequest1, 'byobRequest should be unchanged');
2467 assert_array_equals([...new Uint8Array(byobRequest1.view.buffer)], [1, 2, 3], 'byobRequest.view.buffer should be unchanged');
2470 // respond(1) should partially fill the second read(), but not yet fulfill it
2474 // second BYOB request should use remaining buffer from the second read()
2476 assert_not_equals(byobRequest2, null, 'second byobRequest should exist');
2479 // second respond(1) should fill the read request and fulfill it
2506 assert_not_equals(byobRequest1, null, 'first byobRequest should exist');
2509 // releaseLock() should reject the pending read, but *not* invalidate the BYOB request
2513 assert_not_equals(controller.byobRequest, null, 'byobRequest should not be invalidated after releaseLock()');
2514 assert_equals(controller.byobRequest, byobRequest1, 'byobRequest should be unchanged');
2515 assert_array_equals([...new Uint8Array(byobRequest1.view.buffer)], [1, 2, 3], 'byobRequest.view.buffer should be unchanged');
2518 // respond(3) should fulfill the second read(), and put 1 remaining byte in the queue
2524 assert_equals(byobRequest2, null, 'byobRequest should be null after respond()');
2530 // third read() should fulfill with the remaining byte
2551 assert_not_equals(byobRequest1, null, 'first byobRequest should exist');
2554 // releaseLock() should reject the pending read, but *not* invalidate the BYOB request
2558 assert_not_equals(controller.byobRequest, null, 'byobRequest should not be invalidated after releaseLock()');
2561 // respondWithNewView() should fulfill the *second* read() request
2566 assert_equals(byobRequest2, null, 'byobRequest should be null after respondWithNewView()');
2587 assert_not_equals(byobRequest1, null, 'first byobRequest should exist');
2590 // releaseLock() should reject the pending read, but *not* invalidate the BYOB request
2594 assert_not_equals(controller.byobRequest, null, 'byobRequest should not be invalidated after releaseLock()');
2597 // enqueue() should fulfill the *second* read() request
2600 assert_equals(byobRequest2, null, 'byobRequest should be null after enqueue()');
2621 assert_not_equals(byobRequest1, null, 'first byobRequest should exist');
2624 // releaseLock() should reject the pending read, but *not* invalidate the BYOB request
2628 assert_not_equals(controller.byobRequest, null, 'byobRequest should not be invalidated after releaseLock()');
2631 // close() followed by respond(0) should fulfill the second read()
2635 assert_equals(byobRequest2, null, 'byobRequest should be null after respond()');
2657 assert_not_equals(byobRequest1, null, 'first byobRequest should exist');
2660 // releaseLock() should reject the pending read, but *not* invalidate the BYOB request
2664 assert_not_equals(controller.byobRequest, null, 'byobRequest should not be invalidated after releaseLock()');
2667 // respond() should fulfill the *second* read() request
2671 assert_equals(byobRequest2, null, 'byobRequest should be null after respond()');
2693 assert_not_equals(byobRequest1, null, 'first byobRequest should exist');
2696 // releaseLock() should reject the pending read, but *not* invalidate the BYOB request
2700 assert_not_equals(controller.byobRequest, null, 'byobRequest should not be invalidated after releaseLock()');
2703 // enqueue() should fulfill the *second* read() request
2706 assert_equals(byobRequest2, null, 'byobRequest should be null after enqueue()');
2728 assert_not_equals(byobRequest1, null, 'first byobRequest should exist');
2731 // releaseLock() should reject the pending read, but *not* invalidate the BYOB request
2735 assert_not_equals(controller.byobRequest, null, 'byobRequest should not be invalidated after releaseLock()');
2738 // respond() should fulfill the *second* read() request
2742 assert_equals(byobRequest2, null, 'byobRequest should be null after respond()');
2764 assert_not_equals(byobRequest1, null, 'first byobRequest should exist');
2767 // releaseLock() should reject the pending read, but *not* invalidate the BYOB request
2771 assert_not_equals(controller.byobRequest, null, 'byobRequest should not be invalidated after releaseLock()');
2774 // enqueue() should fulfill the *second* read() request
2777 assert_equals(byobRequest2, null, 'byobRequest should be null after enqueue()');
2798 assert_not_equals(byobRequest1, null, 'first byobRequest should exist');
2801 // respond(1) should partially fill the first read(), but not yet fulfill it
2805 assert_not_equals(byobRequest2, null, 'second byobRequest should exist');
2808 // releaseLock() should reject the pending read, but *not* invalidate the BYOB request
2812 assert_not_equals(controller.byobRequest, null, 'byobRequest should not be invalidated after releaseLock()');
2813 assert_equals(controller.byobRequest, byobRequest2, 'byobRequest should be unchanged');
2814 assert_typed_array_equals(byobRequest2.view, new Uint8Array([0x11, 0]).subarray(1, 2), 'byobRequest.view should be unchanged');
2817 // second respond(1) should fill the read request and fulfill it
2820 assert_equals(controller.byobRequest, null, 'byobRequest should be invalidated after second respond()');
2846 assert_not_equals(byobRequest1, null, 'first byobRequest should exist');
2849 // respond(1) should partially fill the first read(), but not yet fulfill it
2853 assert_not_equals(byobRequest2, null, 'second byobRequest should exist');
2856 // releaseLock() should reject the pending read, but *not* invalidate the BYOB request
2860 assert_not_equals(controller.byobRequest, null, 'byobRequest should not be invalidated after releaseLock()');
2861 assert_equals(controller.byobRequest, byobRequest2, 'byobRequest should be unchanged');
2862 assert_typed_array_equals(byobRequest2.view, new Uint8Array([0x11, 0]).subarray(1, 2), 'byobRequest.view should be unchanged');
2865 // enqueue() should fulfill the read request and put remaining byte in the queue
2867 assert_equals(controller.byobRequest, null, 'byobRequest should be invalidated after second respond()');