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

Unified Diff: tests/standalone/io/stream_pipe_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: Fix namespace comment. 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
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 {

Powered by Google App Engine
This is Rietveld 408576698