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

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

Issue 10837070: Remove old isolate API and update all code in the repository to use (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 8 years, 5 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/socket_close_test.dart ('k') | tests/standalone/io/socket_stream_close_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/socket_many_connections_test.dart
diff --git a/tests/standalone/io/socket_many_connections_test.dart b/tests/standalone/io/socket_many_connections_test.dart
index b536401e7825c26c6c89c686a7c06d4beddb2cd8..98e05cddf3cf6e5b3b3a7b0030697ecaf8bb6de7 100644
--- a/tests/standalone/io/socket_many_connections_test.dart
+++ b/tests/standalone/io/socket_many_connections_test.dart
@@ -17,10 +17,8 @@ class SocketManyConnectionsTest {
_sendPort = null,
_connections = 0,
_sockets = new List<Socket>(CONNECTIONS) {
- new TestServer().spawn().then((SendPort port) {
- _sendPort = port;
- start();
- });
+ _sendPort = spawnFunction(startTestServer);
+ start();
}
void run() {
@@ -65,6 +63,12 @@ class SocketManyConnectionsTest {
int _connections;
}
+
+void startTestServer() {
+ var server = new TestServer();
+ port.receive(server.dispatch);
+}
+
class TestServer extends TestingServer {
void onConnection(Socket connection) {
« no previous file with comments | « tests/standalone/io/socket_close_test.dart ('k') | tests/standalone/io/socket_stream_close_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698