mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
Tests/LibWeb: Verify we throw when trying to pipe from/to locked streams
This commit is contained in:
committed by
Andreas Kling
parent
8ff52582ce
commit
a0802b6e29
Notes:
sideshowbarker
2024-07-17 05:05:51 +09:00
Author: https://github.com/kennethmyhra Commit: https://github.com/SerenityOS/serenity/commit/a0802b6e29 Pull-request: https://github.com/SerenityOS/serenity/pull/23869 Reviewed-by: https://github.com/shannonbooth ✅
@@ -0,0 +1,22 @@
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
asyncTest(done => {
|
||||
const writableStream = new WritableStream(
|
||||
{
|
||||
write(chunk) {}
|
||||
}
|
||||
);
|
||||
const stream = new ReadableStream({
|
||||
start(controller) {},
|
||||
pull(controller) {},
|
||||
cancel() {},
|
||||
});
|
||||
|
||||
stream.getReader();
|
||||
stream.pipeTo(writableStream)
|
||||
.catch(reason => {
|
||||
println(reason);
|
||||
done();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user