| testRunner.waitUntilDone(); |
| async function readUntilError(stream) { |
| const reader = stream.getReader(); |
| let read_value = await reader.read(); |
| if (window.testRunner && window.testRunner.terminateNetworkProcess) { |
| alert("FAIL - successfully read from stream"); |
| // WebKitLegacy can't terminate the network process. |
| if (window.testRunner && window.testRunner.terminateNetworkProcess) { |
| alert("FAIL - error without terminating network process"); |
| var b = new Blob([1, 2, 3]); |
| if (window.testRunner && window.testRunner.terminateNetworkProcess) { |
| testRunner.terminateNetworkProcess(); |
| readUntilError(b.stream()); |