diff options
Diffstat (limited to 'testing/web-platform/tests/streams/readable-streams/cross-realm-crash.window.js')
-rw-r--r-- | testing/web-platform/tests/streams/readable-streams/cross-realm-crash.window.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/testing/web-platform/tests/streams/readable-streams/cross-realm-crash.window.js b/testing/web-platform/tests/streams/readable-streams/cross-realm-crash.window.js new file mode 100644 index 0000000000..5fc7ce37a5 --- /dev/null +++ b/testing/web-platform/tests/streams/readable-streams/cross-realm-crash.window.js @@ -0,0 +1,13 @@ +// This is a repro for a crash bug that existed in Blink. See +// https://crbug.com/1290014. If there's no crash then the test passed. + +test(t => { + const iframeTag = document.createElement('iframe'); + document.body.appendChild(iframeTag); + + const readableStream = new ReadableStream(); + const reader = new iframeTag.contentWindow.ReadableStreamDefaultReader(readableStream); + iframeTag.remove(); + reader.cancel(); + reader.read(); +}, 'should not crash on reading from stream cancelled in destroyed realm'); |