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

Unified Diff: tests/standalone/src/ListInputStreamTest.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/HttpTest.dart ('k') | tests/standalone/src/ListOutputStreamTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/ListInputStreamTest.dart
diff --git a/tests/standalone/src/ListInputStreamTest.dart b/tests/standalone/src/ListInputStreamTest.dart
index 7248592429022b420ee7abf0d523b2f455c22f16..89f15d2e991ac9d736057a28965a270bb6fbc09c 100644
--- a/tests/standalone/src/ListInputStreamTest.dart
+++ b/tests/standalone/src/ListInputStreamTest.dart
@@ -15,12 +15,12 @@ void testEmptyListInputStream() {
throw "No data expected";
}
- void onClose() {
+ void onClosed() {
donePort.toSendPort().send(null);
}
- stream.dataHandler = onData;
- stream.closeHandler = onClose;
+ stream.onData = onData;
+ stream.onClosed = onClosed;
donePort.receive((x,y) => donePort.close());
}
@@ -33,12 +33,12 @@ void testEmptyDynamicListInputStream() {
throw "No data expected";
}
- void onClose() {
+ void onClosed() {
donePort.toSendPort().send(null);
}
- stream.dataHandler = onData;
- stream.closeHandler = onClose;
+ stream.onData = onData;
+ stream.onClosed = onClosed;
stream.markEndOfStream();
donePort.receive((x,y) => donePort.close());
@@ -58,13 +58,13 @@ void testListInputStream1() {
Expect.equals(data[count++], x[0]);
}
- void onClose() {
+ void onClosed() {
Expect.equals(data.length, count);
donePort.toSendPort().send(count);
}
- stream.dataHandler = onData;
- stream.closeHandler = onClose;
+ stream.onData = onData;
+ stream.onClosed = onClosed;
donePort.receive((x,y) => donePort.close());
}
@@ -85,13 +85,13 @@ void testListInputStream2() {
Expect.equals(data[count++], x[1]);
}
- void onClose() {
+ void onClosed() {
Expect.equals(data.length, count);
donePort.toSendPort().send(count);
}
- stream.dataHandler = onData;
- stream.closeHandler = onClose;
+ stream.onData = onData;
+ stream.onClosed = onClosed;
donePort.receive((x,y) => donePort.close());
}
@@ -104,13 +104,13 @@ void testListInputStreamPipe1() {
OutputStream output = new ListOutputStream();
ReceivePort donePort = new ReceivePort();
- void onClose() {
+ void onClosed() {
var contents = output.contents();
Expect.equals(data.length, contents.length);
donePort.toSendPort().send(null);
}
- input.closeHandler = onClose;
+ input.onClosed = onClosed;
input.pipe(output);
donePort.receive((x,y) => donePort.close());
@@ -122,12 +122,12 @@ void testListInputStreamPipe2() {
ReceivePort donePort = new ReceivePort();
int count = 0;
- void onClose() {
+ void onClosed() {
if (count < 10) {
InputStream input = new ListInputStream();
input.write(data);
input.markEndOfStream();
- input.closeHandler = onClose;
+ input.onClosed = onClosed;
if (count < 9) {
input.pipe(output, close: false);
} else {
@@ -144,7 +144,7 @@ void testListInputStreamPipe2() {
InputStream input = new ListInputStream();
input.write(data);
input.markEndOfStream();
- input.closeHandler = onClose;
+ input.onClosed = onClosed;
input.pipe(output, close: false);
count++;
@@ -162,12 +162,12 @@ void testListInputClose1() {
throw "No data expected";
}
- void onClose() {
+ void onClosed() {
donePort.toSendPort().send(null);
}
- stream.dataHandler = onData;
- stream.closeHandler = onClose;
+ stream.onData = onData;
+ stream.onClosed = onClosed;
stream.close();
donePort.receive((x,y) => donePort.close());
@@ -186,13 +186,13 @@ void testListInputClose2() {
stream.close();
}
- void onClose() {
+ void onClosed() {
Expect.equals(2, count);
donePort.toSendPort().send(count);
}
- stream.dataHandler = onData;
- stream.closeHandler = onClose;
+ stream.onData = onData;
+ stream.onClosed = onClosed;
donePort.receive((x,y) => donePort.close());
}
@@ -216,14 +216,14 @@ void testDynamicListInputStream() {
}
}
- void onClose() {
+ void onClosed() {
Expect.equals(data.length, count);
donePort.toSendPort().send(count);
}
stream.write(data);
- stream.dataHandler = onData;
- stream.closeHandler = onClose;
+ stream.onData = onData;
+ stream.onClosed = onClosed;
donePort.receive((x,y) => donePort.close());
}
@@ -237,13 +237,13 @@ void testDynamicListInputClose1() {
throw "No data expected";
}
- void onClose() {
+ void onClosed() {
donePort.toSendPort().send(null);
}
stream.write(data);
- stream.dataHandler = onData;
- stream.closeHandler = onClose;
+ stream.onData = onData;
+ stream.onClosed = onClosed;
stream.close();
Expect.throws(() => stream.write(data), (e) => e is StreamException);
@@ -262,7 +262,7 @@ void testDynamicListInputClose2() {
Expect.throws(() => stream.write(data), (e) => e is StreamException);
}
- void onClose() {
+ void onClosed() {
Expect.equals(15, count);
donePort.toSendPort().send(null);
}
@@ -270,8 +270,8 @@ void testDynamicListInputClose2() {
stream.write(data);
stream.write(data);
stream.write(data);
- stream.dataHandler = onData;
- stream.closeHandler = onClose;
+ stream.onData = onData;
+ stream.onClosed = onClosed;
donePort.receive((x,y) => donePort.close());
}
« no previous file with comments | « tests/standalone/src/HttpTest.dart ('k') | tests/standalone/src/ListOutputStreamTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698