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

Unified Diff: tests/standalone/io/raw_socket_typed_data_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
« no previous file with comments | « tests/standalone/io/raw_socket_test.dart ('k') | tests/standalone/io/regress_10026_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/raw_socket_typed_data_test.dart
diff --git a/tests/standalone/io/raw_socket_typed_data_test.dart b/tests/standalone/io/raw_socket_typed_data_test.dart
index e843aba104d82db693b52f5b1c884f5129814683..e511d0cd6803af8f42090bc85e68a5c44ef2670a 100644
--- a/tests/standalone/io/raw_socket_typed_data_test.dart
+++ b/tests/standalone/io/raw_socket_typed_data_test.dart
@@ -7,12 +7,13 @@
// VMOptions=--short_socket_write
// VMOptions=--short_socket_read --short_socket_write
-import "package:expect/expect.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";
+
testOutOfRange() {
RawServerSocket.bind(InternetAddress.LOOPBACK_IP_V4, 0).then((server) {
server.listen((client) {
@@ -88,7 +89,7 @@ void testSimpleReadWrite() {
// writes and the server echos. When the server has finished its
// echo it half-closes. When the client gets the close event is
// closes fully.
- ReceivePort port = new ReceivePort();
+ asyncStart();
// The test data to send is 5 times 256 bytes and 4 times 128
// bytes. This is all the legal byte values from the integer typed
@@ -205,7 +206,7 @@ void testSimpleReadWrite() {
default: throw "Unexpected event $event";
}
},
- onDone: () => port.close());
+ onDone: () => asyncEnd());
});
});
}
« no previous file with comments | « tests/standalone/io/raw_socket_test.dart ('k') | tests/standalone/io/regress_10026_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698