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

Unified Diff: LayoutTests/http/tests/fetch/script-tests/fetch-body-mixin.js

Issue 1192913007: Change BodyStreamBuffer to be FetchDataConsumerHandle-based and enable backpressure in Fetch API (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: (temp) alternative to calling didGetReadable in sync. Created 5 years, 6 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: LayoutTests/http/tests/fetch/script-tests/fetch-body-mixin.js
diff --git a/LayoutTests/http/tests/fetch/script-tests/fetch-body-mixin.js b/LayoutTests/http/tests/fetch/script-tests/fetch-body-mixin.js
index 72583524d15a8b679a0308b1bb5945edf7c99db0..27b7803fb052f3ae1a20ccb66d20df0a91e52df2 100644
--- a/LayoutTests/http/tests/fetch/script-tests/fetch-body-mixin.js
+++ b/LayoutTests/http/tests/fetch/script-tests/fetch-body-mixin.js
@@ -44,9 +44,11 @@ sequential_promise_test(function(test) {
}, 'FetchStreamTest');
sequential_promise_test(function(test) {
- return fetch('/fetch/resources/doctype.html')
+ return fetch('/fetch/resources/progressive.php')
.then(function(response) {
var p1 = response.text();
+ // Because progressive.php takes some time to load, we expect
+ // response.text() is not yet completed here.
var p2 = response.text().then(function() {
return Promise.reject(new Error('resolved unexpectedly'));
}, function(e) {
@@ -55,7 +57,7 @@ sequential_promise_test(function(test) {
return Promise.all([p1, p2]);
})
.then(function(results) {
- assert_equals(results[0], '<!DOCTYPE html>\n');
+ assert_equals(results[0].length, 190);
assert_equals(results[1].name, 'TypeError');
})
}, 'FetchTwiceTest');

Powered by Google App Engine
This is Rietveld 408576698