mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 15:49:11 +00:00
Tests/LibWeb: Verify setting {readable,writable}Type throws RangeError
This test proves that setting transformer.{readable,writable}Type to a value throws a RangeError.
This commit is contained in:
parent
221f18f72e
commit
1f4f750052
Notes:
sideshowbarker
2024-07-16 18:03:21 +09:00
Author: https://github.com/kennethmyhra
Commit: 1f4f750052
Pull-request: https://github.com/SerenityOS/serenity/pull/19998
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/shannonbooth
2 changed files with 21 additions and 0 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
'readableType' => Exception raised of RangeError
|
||||||
|
'writableType' => Exception raised of RangeError
|
|
@ -0,0 +1,19 @@
|
||||||
|
<script src="../include.js"></script>
|
||||||
|
<script>
|
||||||
|
test(() => {
|
||||||
|
try {
|
||||||
|
new TransformStream({
|
||||||
|
readableType: 'bytes',
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
println(`'readableType' => Exception raised of ${e.constructor.name}`);
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
new TransformStream({
|
||||||
|
writableType: 'bytes',
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
println(`'writableType' => Exception raised of ${e.constructor.name}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
Loading…
Add table
Add a link
Reference in a new issue