ladybird/Tests/LibWeb/Text/input/HTML/StructuredClone-serializable-objects.html
Kenneth Myhra 44e5c62545 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.
2024-02-26 16:10:20 -07:00

12 lines
382 B
HTML

<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>