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

Unified Diff: tests/standalone/io/echo_server_stream_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/language/typed_message_test.dart ('k') | tests/standalone/io/echo_server_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_stream_test.dart
diff --git a/tests/standalone/io/echo_server_stream_test.dart b/tests/standalone/io/echo_server_stream_test.dart
index 775795c7bb8adc6353e80b95d1b1918a2103c4eb..50db4930134db2a3240807f9decadc7592096f99 100644
--- a/tests/standalone/io/echo_server_stream_test.dart
+++ b/tests/standalone/io/echo_server_stream_test.dart
@@ -27,10 +27,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() {
@@ -135,6 +133,12 @@ class EchoServerGame {
}
+void startEchoServer() {
+ var server = new EchoServer();
+ port.receive(server.dispatch);
+}
+
+
class EchoServer extends TestingServer {
static final int MSGSIZE = EchoServerGame.MSGSIZE;
« no previous file with comments | « tests/language/typed_message_test.dart ('k') | tests/standalone/io/echo_server_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698