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

Unified Diff: tests/standalone/src/StreamPipeTest.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/SocketStreamCloseTest.dart ('k') | tests/standalone/src/StringStreamTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/StreamPipeTest.dart
diff --git a/tests/standalone/src/StreamPipeTest.dart b/tests/standalone/src/StreamPipeTest.dart
index c67bc373d1c8145322ca147961d6b4af9dc09732..f32b2fb65a11b3514c229e9e77a53519d3363655 100644
--- a/tests/standalone/src/StreamPipeTest.dart
+++ b/tests/standalone/src/StreamPipeTest.dart
@@ -84,7 +84,7 @@ class PipeServerGame {
SocketOutputStream socketOutput = _socket.outputStream;
InputStream fileInput = new File(srcFileName).openInputStream();
- fileInput.closeHandler = () {
+ fileInput.onClosed = () {
SocketInputStream socketInput = _socket.inputStream;
var tempDir = new Directory('');
tempDir.createTempSync();
@@ -93,10 +93,10 @@ class PipeServerGame {
dstFile.createSync();
var fileOutput = dstFile.openOutputStream();
- socketInput.closeHandler = () {
+ socketInput.onClosed = () {
// Check that the resulting file is equal to the initial
// file.
- fileOutput.closeHandler = () {
+ fileOutput.onClosed = () {
bool result = compareFileContent(srcFileName, dstFileName);
new File(dstFileName).deleteSync();
tempDir.deleteSync();
@@ -122,7 +122,7 @@ class PipeServerGame {
// Connect to the server.
_socket = new Socket(TestingServer.HOST, _port);
if (_socket !== null) {
- _socket.connectHandler = connectHandler;
+ _socket.onConnect = connectHandler;
} else {
Expect.fail("socket creation failed");
}
@@ -153,7 +153,7 @@ class PipeServerGame {
// stream to its output stream.
class PipeServer extends TestingServer {
void connectionHandler(Socket connection) {
- connection.errorHandler = () { Expect.fail("Socket error"); };
+ connection.onError = () { Expect.fail("Socket error"); };
connection.inputStream.pipe(connection.outputStream);
}
}
@@ -177,7 +177,7 @@ testFileToFilePipe1() {
new File(dstFileName).createSync();
var dstStream = new File(dstFileName).openOutputStream();
- dstStream.closeHandler = () {
+ dstStream.onClosed = () {
bool result = compareFileContent(srcFileName, dstFileName);
new File(dstFileName).deleteSync();
tempDir.deleteSync();
@@ -209,10 +209,10 @@ testFileToFilePipe2() {
dstFile.createSync();
var dstStream = dstFile.openOutputStream();
- srcStream.closeHandler = () {
+ srcStream.onClosed = () {
dstStream.write([32]);
dstStream.close();
- dstStream.closeHandler = () {
+ dstStream.onClosed = () {
var src = srcFile.openSync();
var dst = dstFile.openSync();
var srcLength = src.lengthSync();
@@ -256,10 +256,10 @@ testFileToFilePipe3() {
dstFile.createSync();
var dstStream = dstFile.openOutputStream();
- srcStream.closeHandler = () {
+ srcStream.onClosed = () {
var srcStream2 = srcFile.openInputStream();
- dstStream.closeHandler = () {
+ dstStream.onClosed = () {
var src = srcFile.openSync();
var dst = dstFile.openSync();
var srcLength = src.lengthSync();
« no previous file with comments | « tests/standalone/src/SocketStreamCloseTest.dart ('k') | tests/standalone/src/StringStreamTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698