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

Unified Diff: tests/standalone/io/web_socket_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: 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/web_socket_test.dart
diff --git a/tests/standalone/io/web_socket_test.dart b/tests/standalone/io/web_socket_test.dart
index d129354640cd65e75c23eb4689a389bf1a85f04a..31d7a2f3648dcc7ecfdbf7b9866cbe549032add5 100644
--- a/tests/standalone/io/web_socket_test.dart
+++ b/tests/standalone/io/web_socket_test.dart
@@ -7,13 +7,14 @@
// VMOptions=--short_socket_write
// VMOptions=--short_socket_read --short_socket_write
-import "package:expect/expect.dart";
-import "package:path/path.dart";
import "dart:async";
import "dart:io";
-import "dart:isolate";
import "dart:typed_data";
+import "package:async_helper/async_helper.dart";
+import "package:expect/expect.dart";
+import "package:path/path.dart";
+
const String CERT_NAME = 'localhost_cert';
const String HOST_NAME = 'localhost';
@@ -48,7 +49,9 @@ class SecurityConfiguration {
Expect.equals(closeStatus == null
? WebSocketStatus.NO_STATUS_RECEIVED
: closeStatus, webSocket.closeCode);
- Expect.equals(closeReason == null ? "" : closeReason, webSocket.closeReason);
+ Expect.equals(
+ closeReason == null ? ""
+ : closeReason, webSocket.closeReason);
});
});
@@ -248,11 +251,11 @@ class SecurityConfiguration {
void testUsePOST() {
createServer().then((server) {
- var errorPort = new ReceivePort();
+ asyncStart();
server.transform(new WebSocketTransformer()).listen((webSocket) {
Expect.fail("No connection expected");
}, onError: (e) {
- errorPort.close();
+ asyncEnd();
});
HttpClient client = new HttpClient();

Powered by Google App Engine
This is Rietveld 408576698