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

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

Issue 11644025: Make request_test wait for its results. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http/test/request_test.dart
diff --git a/pkg/http/test/request_test.dart b/pkg/http/test/request_test.dart
index 1b3d4cace964a16021ffb2e5a895c0ab1d3f8e25..7ab1da61b68978e146fe8a2d57f2c550473cf76d 100644
--- a/pkg/http/test/request_test.dart
+++ b/pkg/http/test/request_test.dart
@@ -21,9 +21,9 @@ void main() {
expect(response.statusCode, equals(200));
return consumeInputStream(response.stream);
}).transform((bytes) => new String.fromCharCodes(bytes));
- future.onComplete((_) {
+ future.onComplete(expectAsync1((_) {
stopServer();
- });
+ }));
expect(future, completion(parse(equals({
'method': 'POST',
@@ -196,11 +196,11 @@ void main() {
print("#followRedirects test response received");
expect(response.statusCode, equals(302));
});
- future.onComplete((_) {
+ future.onComplete(expectAsync1((_) {
print("#followRedirects test stopping server...");
stopServer();
print("#followRedirects test server stopped");
- });
+ }));
expect(future, completes);
print("#followRedirects test started");
@@ -220,11 +220,11 @@ void main() {
expect(e, isRedirectLimitExceededException);
expect(e.redirects.length, equals(2));
});
- future.onComplete((_) {
+ future.onComplete(expectAsync1((_) {
print("#maxRedirects test stopping server...");
stopServer();
print("#maxRedirects test server stopped");
- });
+ }));
expect(future, completes);
print("#maxRedirects test started");
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698