Chromium Code Reviews| 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..ed36acefbfd97f1d75d78c958fa8009d2318e68f 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,14 @@ class SocketManyConnectionsTest { |
| int _connections; |
| } |
| + |
| +void startTestServer() { |
| + var server = new TestServer(); |
| + port.receive((message, replyTo) { |
| + server.dispatch(message, replyTo); |
|
kasperl
2012/08/03 05:20:27
!
|
| + }); |
| +} |
| + |
| class TestServer extends TestingServer { |
| void onConnection(Socket connection) { |