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

Unified Diff: tests/standalone/io/socket_many_connections_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/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) {

Powered by Google App Engine
This is Rietveld 408576698