ladybird/Tests/LibWeb/Text/input/Streams/CountQueuingStrategy-enqueue-desired-size.html

26 lines
728 B
HTML
Raw Normal View History

2025-03-18 19:28:35 +01:00
<!DOCTYPE html>
<script src="../include.js"></script>
<script>
test(() => {
let controller;
new ReadableStream(
{
start(c) {
controller = c;
}
},
new CountQueuingStrategy({ highWaterMark: 3 })
);
println(controller.desiredSize);
controller.enqueue('Hello, friends!');
println(controller.desiredSize);
controller.enqueue('Enqueues being counted...');
println(controller.desiredSize);
controller.enqueue('By CountQueuingStrategy');
println(controller.desiredSize);
controller.enqueue('!');
println(controller.desiredSize);
});
</script>