| <!doctype html> |
| <html> |
| <head> |
| <meta charset="utf-8"> |
| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| </head> |
| <body> |
| <script> |
| |
| test(() => { |
| const iframe = document.body.appendChild(document.createElement('iframe')); |
| const stream = new iframe.contentWindow.ReadableStream({ |
| start(c) { c.enqueue("hello"); } |
| }); |
| |
| iframe.remove(); |
| |
| try { |
| stream.values(); |
| } catch (e) { |
| assert_equals(e.name, "InvalidStateError"); |
| } |
| }, "ReadableStream values() does not crash when the stream's iframe has been detached"); |
| |
| </script> |
| </body> |
| </html> |