Chromium Code Reviews| Index: tests/standalone/io/stream_pipe_test.dart |
| diff --git a/tests/standalone/io/stream_pipe_test.dart b/tests/standalone/io/stream_pipe_test.dart |
| index 84dc0d064db2bb27203d2e937af0f677f15ccfb3..eaaaf823f1753c871fb39ab9927cdde7e4e164a8 100644 |
| --- a/tests/standalone/io/stream_pipe_test.dart |
| +++ b/tests/standalone/io/stream_pipe_test.dart |
| @@ -68,10 +68,8 @@ class PipeServerGame { |
| : _receivePort = new ReceivePort(), |
| _sendPort = null, |
| _messages = 0 { |
| - new PipeServer().spawn().then((SendPort port) { |
| - _sendPort = port; |
| - start(); |
| - }); |
| + _sendPort = spawnFunction(startPipeServer); |
| + start(); |
| } |
| void runTest() { |
| @@ -147,6 +145,14 @@ class PipeServerGame { |
| } |
| +void startPipeServer() { |
| + var server = new PipeServer(); |
| + port.receive((message, replyTo) { |
| + server.dispatch(message, replyTo); |
|
kasperl
2012/08/03 05:20:27
!
|
| + }); |
| +} |
| + |
| + |
| // The testing server will simply pipe each connecting sockets input |
| // stream to its output stream. |
| class PipeServer extends TestingServer { |