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

Unified Diff: tests/standalone/io/http_client_exception_test.dart

Issue 23886004: Update dart:io tests to use asyncStart/asyncEnd (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 7 years, 3 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: tests/standalone/io/http_client_exception_test.dart
diff --git a/tests/standalone/io/http_client_exception_test.dart b/tests/standalone/io/http_client_exception_test.dart
index 9028b6dffb1f6bca8ce8a7d4e2b649903cb385ab..e557e8d6db8e38c10c49063071264eab941c5a25 100644
--- a/tests/standalone/io/http_client_exception_test.dart
+++ b/tests/standalone/io/http_client_exception_test.dart
@@ -3,9 +3,10 @@
// BSD-style license that can be found in the LICENSE file.
//
-import "package:expect/expect.dart";
import "dart:io";
-import "dart:isolate";
+
+import "package:async_helper/async_helper.dart";
+import "package:expect/expect.dart";
void testInvalidUrl() {
HttpClient client = new HttpClient();
@@ -14,13 +15,13 @@ void testInvalidUrl() {
}
void testBadHostName() {
+ asyncStart();
HttpClient client = new HttpClient();
- ReceivePort port = new ReceivePort();
client.get("some.bad.host.name.7654321", 0, "/")
.then((request) {
Expect.fail("Should not open a request on bad hostname");
}).catchError((error) {
- port.close(); // We expect onError to be called, due to bad host name.
+ asyncEnd(); // We expect onError to be called, due to bad host name.
}, test: (error) => error is! String);
}
« no previous file with comments | « tests/standalone/io/http_client_connect_test.dart ('k') | tests/standalone/io/http_client_request_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698