Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/stream-reader.js

Issue 2325543002: [Fetch API] Call endRead sooner to avoid recursive invocation (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..49625d3890644a58388475ca8d64d27fe0420748 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,17 @@ promise_test(function(t) {
});
}, 'read contents with ReadableStreamReader');
+promise_test(() => {
+ let reader;
+ return fetch('/fetch/resources/progressive.php').then(res => {
+ 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);
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698