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

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

Issue 9500002: Rename blahHandler to onBlah throughout dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Renaming 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
Index: tests/standalone/src/FileOutputStreamTest.dart
diff --git a/tests/standalone/src/FileOutputStreamTest.dart b/tests/standalone/src/FileOutputStreamTest.dart
index 95ef132d7b3157e57f3d6a3213dca9db06444bb4..89f24496d0b0c47dd6c33464ab2ff07e7bc5cd61 100644
--- a/tests/standalone/src/FileOutputStreamTest.dart
+++ b/tests/standalone/src/FileOutputStreamTest.dart
@@ -23,7 +23,7 @@ void testOpenOutputStreamSync() {
OutputStream x = file.openOutputStream();
x.write([65, 66, 67]);
x.close();
- x.closeHandler = () {
+ x.onClosed = () {
file.deleteSync();
done.toSendPort().send("done");
};
@@ -36,27 +36,24 @@ void testOutputStreamNoPendingWrite() {
// Create a port for waiting on the final result of this test.
ReceivePort done = new ReceivePort();
done.receive((message, replyTo) {
- tempDirectory.delete();
- tempDirectory.deleteHandler = () {
+ tempDirectory.delete(true, () {
done.close();
- };
+ });
});
- tempDirectory.createTemp();
- tempDirectory.createTempHandler = () {
+ tempDirectory.createTemp(() {
String fileName = "${tempDirectory.path}/test";
File file = new File(fileName);
- file.create();
- file.createHandler = () {
+ file.create(() {
OutputStream stream = file.openOutputStream();
final total = 100;
var count = 0;
- stream.noPendingWriteHandler = () {
+ stream.onNoPendingWrites = () {
stream.write([count++]);
if (count == total) {
stream.close();
}
- stream.closeHandler = () {
+ stream.onClosed = () {
List buffer = new List<int>(total);
File fileSync = new File(fileName);
var openedFile = fileSync.openSync();
@@ -69,8 +66,8 @@ void testOutputStreamNoPendingWrite() {
done.toSendPort().send("done");
};
};
- };
- };
+ });
+ });
}

Powered by Google App Engine
This is Rietveld 408576698