Chromium Code Reviews| 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 3b0d513e9f905b7fea0ef923fa13673c2716448b..5a80c605fd524f88e952b872e49258bcd6c3e418 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 |
| @@ -37,6 +37,19 @@ promise_test(function(t) { |
| }); |
| }, 'read contents with ReadableStreamReader'); |
| +promise_test(() => { |
| + let reader; |
| + let body; |
|
tyoshino (SeeGerritForStatus)
2016/09/06 10:58:06
body no longer need to be declared outside?
yhirano
2016/09/06 11:03:07
Done.
|
| + return fetch('/fetch/resources/progressive.php').then(res => { |
| + body = res.body; |
|
tyoshino (SeeGerritForStatus)
2016/09/06 10:58:06
ah, this line itself is no longer needed.
yhirano
2016/09/06 11:03:07
Done.
|
| + reader = res.body.getReader(); |
| + return Promise.all([reader.read(), reader.read(), reader.read()]); |
| + }).then(() => { |
| + reader.releaseLock(); |
| + // We expect the test finishes without crashing. |
| + }); |
| + }, 'parallel read'); |
| + |
| promise_test(function(t) { |
| return fetch('/fetch/resources/progressive.php').then(function(res) { |
| assert_false(res.bodyUsed); |