mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-01 07:52:50 +00:00
Tests/LibWeb: Add test to prove we can {,de}serialize Blob
This test proves the ability of structuredClone() to serialize and deserialize a Blob object.
This commit is contained in:
parent
27445f3132
commit
44e5c62545
Notes:
sideshowbarker
2024-07-18 02:47:59 +09:00
Author: https://github.com/kennethmyhra
Commit: 44e5c62545
Pull-request: https://github.com/SerenityOS/serenity/pull/23323
Reviewed-by: https://github.com/ADKaster ✅
2 changed files with 15 additions and 0 deletions
|
@ -0,0 +1,12 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
asyncTest(async done => {
|
||||
let blob = structuredClone(new Blob(["Hello, Blob!"], {type: "text/plain"}));
|
||||
println(`instanceOf Blob: ${blob instanceof Blob}`);
|
||||
println(`Blob.type: ${blob.type}`);
|
||||
let text = await blob.text();
|
||||
println(`Blob.text(): ${text}`);
|
||||
|
||||
done();
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue