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

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: 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/FileInvalidArgumentsTest.dart ('k') | tests/standalone/src/FileTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/FileOutputStreamTest.dart
diff --git a/tests/standalone/src/FileOutputStreamTest.dart b/tests/standalone/src/FileOutputStreamTest.dart
index 95ef132d7b3157e57f3d6a3213dca9db06444bb4..89760ecde380a5b8f44cbb07154b3efd44b57a3e 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.deleteRecursively(() {
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");
};
};
- };
- };
+ });
+ });
}
« no previous file with comments | « tests/standalone/src/FileInvalidArgumentsTest.dart ('k') | tests/standalone/src/FileTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698