| 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 5ffd8d9d88b1c1cebc462861333f87af9d9a373f..3b0d513e9f905b7fea0ef923fa13673c2716448b 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
|
| @@ -11,6 +11,7 @@ promise_test(function(t) {
|
| reader.releaseLock();
|
| var another = stream.getReader();
|
| assert_not_equals(another, reader);
|
| + another.releaseLock();
|
| });
|
| }, 'ReadableStreamReader acquisition / releasing');
|
|
|
| @@ -40,12 +41,14 @@ promise_test(function(t) {
|
| return fetch('/fetch/resources/progressive.php').then(function(res) {
|
| assert_false(res.bodyUsed);
|
| var reader = res.body.getReader();
|
| - assert_true(res.bodyUsed);
|
| - return res.text();
|
| - }).then(unreached_rejection(t), function() {
|
| - // text() should fail because bodyUsed is set.
|
| + assert_false(res.bodyUsed);
|
| + return res.text().then(unreached_fulfillment(t), function() {
|
| + // text() should fail because the body is locked.
|
| + // TODO(yhirano): Use finally once it gets available.
|
| + reader.releaseLock();
|
| + });
|
| });
|
| - }, 'acquiring a reader should set bodyUsed.');
|
| + }, 'acquiring a reader should not set bodyUsed.');
|
|
|
| promise_test(function(t) {
|
| var reader;
|
|
|