mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 10:37:41 +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
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