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

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

Issue 11801008: Fix tests for VM in checked mode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add missing expectAsync1 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 | « no previous file | 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 e837ba8c9b777402fc9d82c70bcd9190f3b8d12c..164402b3d4603e1db5a03ebdbc5aa1a938fc4534 100644
--- a/pkg/http/test/client_test.dart
+++ b/pkg/http/test/client_test.dart
@@ -28,15 +28,17 @@ void main() {
}).then((bytes) => new String.fromCharCodes(bytes));
future.catchError((_) {}).then((_) => client.close());
- expect(future, completion(parse(equals({
- 'method': 'POST',
- 'path': '/',
- 'headers': {
- 'content-type': ['application/json; charset=utf-8'],
- 'transfer-encoding': ['chunked']
- },
- 'body': '{"hello": "world"}'
- }))));
+ future.then(expectAsync1((content) {
+ expect(content, parse(equals({
+ 'method': 'POST',
+ 'path': '/',
+ 'headers': {
+ 'content-type': ['application/json; charset=utf-8'],
+ 'transfer-encoding': ['chunked']
+ },
+ 'body': '{"hello": "world"}'
+ })));
+ }));
request.stream.writeString('{"hello": "world"}');
request.stream.close();
« no previous file with comments | « no previous file | pkg/http/test/http_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698