Files
ladybird/Tests/LibWeb/Text/input/Streams/QueuingStrategy-same-instance.html
Shannon Booth d527c5df5d LibWeb: Allow using queuing strategies on globals other than Window
These interfaces are exposed on *, meaning it should work for workers
and our newly added shadow realm global object by being stored on the
universal global scope mixin.
2024-11-20 18:01:21 -07:00

11 lines
423 B
HTML

<script src="../include.js"></script>
<script>
test(() => {
for (const QueuingStrategy of [CountQueuingStrategy, ByteLengthQueuingStrategy]) {
const size1 = (new QueuingStrategy({ highWaterMark: 5 })).size;
const size2 = (new QueuingStrategy({ highWaterMark: 10 })).size;
println(`${QueuingStrategy.name} | size1 === size2 -> ${size1 === size2}`);
}
})
</script>