| Index: third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/stream-reader.js
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/stream-reader.js b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/stream-reader.js
|
| index 49625d3890644a58388475ca8d64d27fe0420748..3fe149870237446635e37cf5d5b535eb6cd2137f 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/stream-reader.js
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/stream-reader.js
|
| @@ -96,4 +96,15 @@ promise_test(function(t) {
|
| });
|
| }, 'Cancelling stream should not affect cloned one.');
|
|
|
| +promise_test(t => {
|
| + let reader;
|
| + return fetch('/fetch/resources/slow-failure.cgi').then(res => {
|
| + reader = res.body.getReader();
|
| + return readableStreamToArray(res.body, reader);
|
| + }).then(unreached_fulfillment(t), e => {
|
| + reader.releaseLock();
|
| + assert_equals(e.name, 'TypeError');
|
| + });
|
| + }, 'Streaming error should be reported as a TypeError.');
|
| +
|
| done();
|
|
|