node/test/fixtures/wpt/streams/readable-streams/crashtests/from-cross-realm.https.html
Mattias Buelens 9c046ea804 test: update streams wpt
PR-URL: https://github.com/nodejs/node/pull/56072
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
2024-12-07 03:45:13 +00:00

18 lines
593 B
HTML

<html class="test-wait">
<meta charset="utf-8">
<script type="module">
let a = window.open()
try {
let dir = await a.navigator.storage.getDirectory()
let hdl = await dir.getFileHandle("7399d8cf-9ff9-494d-89eb-d3045f229c27", {"create": true})
let map = new Map([[]])
let b = ReadableStream.from(map)
let c = await hdl.createWritable({ })
await b.pipeTo(c, { }).catch(() => {
// Error expected as we are not piping the right form of chunk to FileHandle
})
} finally {
document.documentElement.classList.remove("test-wait")
a.close()
}
</script>