ladybird/Tests/LibWeb/Text/input/Streams/TransformStream-cancelled-by-readable-side.html

18 lines
528 B
HTML
Raw Normal View History

2025-03-18 19:28:35 +01:00
<!DOCTYPE html>
<script src="../include.js"></script>
<script>
function testTransformStreamReadableStreamCancellation() {
const transformStream = new TransformStream({
cancel(reason) {
println(`TransformStream cancelled due to: ${reason}`);
return Promise.resolve();
}
});
transformStream.readable.cancel('cancel called by the readable side.');
}
test(() => {
testTransformStreamReadableStreamCancellation();
});
</script>