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

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

Issue 8413034: New OutputStream interface (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor fix Created 9 years, 2 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/ProcessStderrTest.dart
diff --git a/tests/standalone/src/ProcessStderrTest.dart b/tests/standalone/src/ProcessStderrTest.dart
index ae6d2670f3c4efdfa23e76bf7562db33180c1e52..741eb16358bcd5229d1fe71c625b1e67b755d467 100644
--- a/tests/standalone/src/ProcessStderrTest.dart
+++ b/tests/standalone/src/ProcessStderrTest.dart
@@ -28,26 +28,20 @@ class ProcessStderrTest {
process.start();
int received = 0;
-
- void dataWritten() {
- void readData() {
- List<int> buffer = input.read();
- for (int i = 0; i < buffer.length; i++) {
- Expect.equals(data[received + i], buffer[i]);
- }
- received += buffer.length;
- if (received == BUFFERSIZE) {
- process.close();
- }
+ void readData() {
+ List<int> buffer = input.read();
+ for (int i = 0; i < buffer.length; i++) {
+ Expect.equals(data[received + i], buffer[i]);
+ }
+ received += buffer.length;
+ if (received == BUFFERSIZE) {
+ process.close();
}
-
- input.dataHandler = readData;
}
- bool written = output.write(data, 0, BUFFERSIZE, dataWritten);
- if (written) {
- dataWritten();
- }
+ output.write(data);
+ output.end();
+ input.dataHandler = readData;
}
static void testMain() {

Powered by Google App Engine
This is Rietveld 408576698