blob: edbc3fecc7ff356ba715683090ebc50f6298e462 [file] [log] [blame] [edit]
<!-- webkit-test-runner [ jscOptions=--validateSerializedValue=true ] -->
<html>
<body>
<script>
if (window.testRunner)
testRunner.dumpAsText();
const array = new Array(0x102);
for (let i = 1; i < 0xff; i++)
array[i] = 1n;
array[0] = array[0xff] = {};
array[0x100] = new DOMPoint(2.08e-322);
array[0x101] = new Uint8Array([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, // dummy data ends
0x37, 0x13, 0x00, 0x00, // index
0x10, // StringTag
0x06, 0x00, 0x00, 0x80, // String length
0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x21, // "Hello!"
0xff, 0xff, 0xff, 0xff, // TerminatorTag
]);
const cloned_array = structuredClone(array);
if (cloned_array.length != array.length) {
console.log("FAILED");
throw "FAILED";
}
</script>
</body>
</html>