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

Unified Diff: tests/standalone/src/EchoServerTest.dart

Issue 9500002: Rename blahHandler to onBlah throughout dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 10 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/src/EchoServerStreamTest.dart ('k') | tests/standalone/src/FileInputStreamTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/EchoServerTest.dart
diff --git a/tests/standalone/src/EchoServerTest.dart b/tests/standalone/src/EchoServerTest.dart
index d7add6a5fabd13db663e9a51181bf7bd0b8dc6f1..881390f8383854e988e51ca930a88206ff8771ea 100644
--- a/tests/standalone/src/EchoServerTest.dart
+++ b/tests/standalone/src/EchoServerTest.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
@@ -57,7 +57,7 @@ class EchoServerGame {
for (int i = 0; i < bytesRead; i++) {
Expect.equals(FIRSTCHAR + i, bufferReceived[i]);
}
- _socket.dataHandler = handleRead;
+ _socket.onData = handleRead;
} else {
// We check every time the whole buffer to verify data integrity.
for (int i = 0; i < MSGSIZE; i++) {
@@ -89,21 +89,21 @@ class EchoServerGame {
bytesWritten += _socket.writeList(
_buffer, bytesWritten, MSGSIZE - bytesWritten);
if (bytesWritten < MSGSIZE) {
- _socket.writeHandler = handleWrite;
+ _socket.onWrite = handleWrite;
}
}
handleWrite();
}
- _socket.dataHandler = messageHandler;
- _socket.errorHandler = errorHandler;
+ _socket.onData = messageHandler;
+ _socket.onError = errorHandler;
writeMessage();
}
_socket = new Socket(TestingServer.HOST, _port);
if (_socket !== null) {
- _socket.connectHandler = connectHandler;
+ _socket.onConnect = connectHandler;
} else {
Expect.fail("Socket creation failed");
}
@@ -149,7 +149,7 @@ class EchoServer extends TestingServer {
for (int i = 0; i < bytesRead; i++) {
Expect.equals(EchoServerGame.FIRSTCHAR + i, buffer[i]);
}
- connection.dataHandler = handleRead;
+ connection.onData = handleRead;
} else {
// We check every time the whole buffer to verify data integrity.
for (int i = 0; i < msgSize; i++) {
@@ -165,7 +165,7 @@ class EchoServer extends TestingServer {
buffer, bytesWritten, msgSize - bytesWritten);
bytesWritten += written;
if (bytesWritten < msgSize) {
- connection.writeHandler = handleWrite;
+ connection.onWrite = handleWrite;
} else {
connection.close(true);
}
@@ -188,9 +188,9 @@ class EchoServer extends TestingServer {
Expect.fail("Socket error");
}
- connection.dataHandler = messageHandler;
- connection.closeHandler = closeHandler;
- connection.errorHandler = errorHandler;
+ connection.onData = messageHandler;
+ connection.onClosed = closeHandler;
+ connection.onError = errorHandler;
}
}
« no previous file with comments | « tests/standalone/src/EchoServerStreamTest.dart ('k') | tests/standalone/src/FileInputStreamTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698