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

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

Issue 2439673002: [Fetch API] Streaming error should be reported as a TypeError (Closed)
Patch Set: fix Created 4 years, 2 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
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();

Powered by Google App Engine
This is Rietveld 408576698