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

Unified Diff: pkg/http/test/client_test.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | « pkg/http/lib/testing.dart ('k') | pkg/http/test/http_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http/test/client_test.dart
diff --git a/pkg/http/test/client_test.dart b/pkg/http/test/client_test.dart
index 009f1472ca18ff9fedfaa5756ea07a7b71e984b4..e837ba8c9b777402fc9d82c70bcd9190f3b8d12c 100644
--- a/pkg/http/test/client_test.dart
+++ b/pkg/http/test/client_test.dart
@@ -21,12 +21,12 @@ void main() {
request.headers[HttpHeaders.CONTENT_TYPE] =
'application/json; charset=utf-8';
- var future = client.send(request).chain((response) {
+ var future = client.send(request).then((response) {
expect(response.request, equals(request));
expect(response.statusCode, equals(200));
return consumeInputStream(response.stream);
- }).transform((bytes) => new String.fromCharCodes(bytes));
- future.onComplete((_) => client.close());
+ }).then((bytes) => new String.fromCharCodes(bytes));
+ future.catchError((_) {}).then((_) => client.close());
expect(future, completion(parse(equals({
'method': 'POST',
« no previous file with comments | « pkg/http/lib/testing.dart ('k') | pkg/http/test/http_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698