mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02: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:
committed by
Andrew Kaster
parent
27445f3132
commit
44e5c62545
Notes:
sideshowbarker
2024-07-18 02:47:59 +09:00
Author: https://github.com/kennethmyhra Commit: https://github.com/SerenityOS/serenity/commit/44e5c62545 Pull-request: https://github.com/SerenityOS/serenity/pull/23323 Reviewed-by: https://github.com/ADKaster ✅
@@ -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>
|
||||
Reference in New Issue
Block a user