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

Unified Diff: tests/standalone/src/FileInputStreamTest.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/EchoServerTest.dart ('k') | tests/standalone/src/FileInvalidArgumentsTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/FileInputStreamTest.dart
diff --git a/tests/standalone/src/FileInputStreamTest.dart b/tests/standalone/src/FileInputStreamTest.dart
index 6dfd2f5a6445b3bb9e81e32416ea38b66df1c31c..36613219b7e1080482dc7be3b0a74b79016401dd 100644
--- a/tests/standalone/src/FileInputStreamTest.dart
+++ b/tests/standalone/src/FileInputStreamTest.dart
@@ -16,7 +16,7 @@ void testStringInputStreamSync() {
// File contains "Hello Dart\nwassup!\n"
File file = new File(fileName);
StringInputStream x = new StringInputStream(file.openInputStream());
- x.lineHandler = () {
+ x.onLine = () {
// The file input stream is known (for now) to have read the whole
// file when the data handler is called.
String line = x.readLine();
@@ -32,11 +32,11 @@ void testInputStreamAsync() {
var expected = "Hello Dart\nwassup!\n".charCodes();
InputStream x = (new File(fileName)).openInputStream();
var byteCount = 0;
- x.dataHandler = () {
+ x.onData = () {
Expect.equals(expected[byteCount], x.read(1)[0]);
byteCount++;
};
- x.closeHandler = () {
+ x.onClosed = () {
Expect.equals(expected.length, byteCount);
};
}
@@ -49,7 +49,7 @@ void testStringInputStreamAsync(String name, int length) {
Expect.equals(length, file.openSync().lengthSync());
StringInputStream x = new StringInputStream(file.openInputStream());
int lineCount = 0;
- x.lineHandler = () {
+ x.onLine = () {
var line = x.readLine();
lineCount++;
Expect.isTrue(lineCount <= 10);
@@ -57,7 +57,7 @@ void testStringInputStreamAsync(String name, int length) {
Expect.equals("Line $lineCount", line);
}
};
- x.closeHandler = () {
+ x.onClosed = () {
Expect.equals(10, lineCount);
};
}
@@ -73,14 +73,14 @@ void testChunkedInputStream() {
File file = new File(fileName);
ChunkedInputStream x = new ChunkedInputStream(file.openInputStream());
x.chunkSize = 9;
- x.dataHandler = () {
+ x.onData = () {
List<int> chunk = x.read();
Expect.equals(9, chunk.length);
x.chunkSize = 5;
- x.dataHandler = () {
+ x.onData = () {
chunk = x.read();
Expect.equals(5, chunk.length);
- x.dataHandler = () {
+ x.onData = () {
chunk = x.read();
Expect.equals(5, chunk.length);
chunk = x.read();
« no previous file with comments | « tests/standalone/src/EchoServerTest.dart ('k') | tests/standalone/src/FileInvalidArgumentsTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698