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

Unified Diff: tests/standalone/io/echo_server_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/echo_server_stream_test.dart ('k') | tests/standalone/io/http_advanced_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/echo_server_test.dart
diff --git a/tests/standalone/io/echo_server_test.dart b/tests/standalone/io/echo_server_test.dart
index d197369799fe25787be5eef312237b0f3bdbe700..3ec8112560d1ddbad87a5b22fb23c812be3a2fb5 100644
--- a/tests/standalone/io/echo_server_test.dart
+++ b/tests/standalone/io/echo_server_test.dart
@@ -35,10 +35,8 @@ class EchoServerGame {
for (int i = 0; i < MSGSIZE; i++) {
_buffer[i] = FIRSTCHAR + i;
}
- new EchoServer().spawn().then((SendPort port) {
- _sendPort = port;
- start();
- });
+ _sendPort = spawnFunction(startEchoServer);
+ start();
}
void sendData() {
@@ -129,6 +127,12 @@ class EchoServerGame {
int _messages;
}
+
+void startEchoServer() {
+ var server = new EchoServer();
+ port.receive(server.dispatch);
+}
+
class EchoServer extends TestingServer {
static final msgSize = EchoServerGame.MSGSIZE;
« no previous file with comments | « tests/standalone/io/echo_server_stream_test.dart ('k') | tests/standalone/io/http_advanced_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698