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 5ffd8d9d88b1c1cebc462861333f87af9d9a373f..27e785f598206f5a42a7a6c7d384e1ddde75eab8 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_rejection(t), function() { |
|
tyoshino (SeeGerritForStatus)
2016/04/26 08:15:58
unreached_fulfillment
yhirano
2016/04/26 11:15:40
Done.
|
| + // text() should fail because bodyUsed is set. |
| + // 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; |