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

Unified Diff: tools/testing/dart/test_runner.dart

Issue 9500002: Rename blahHandler to onBlah throughout dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revert temporary edit 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: tools/testing/dart/test_runner.dart
diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart
index 7eddd3f73339cc679b4a7c3b8698506c21829d74..349c8e995a8a6c6ac7a5ea42acdbef73588c2133 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -342,15 +342,15 @@ class RunningProcess {
executable = executable.replaceAll('/', '\\');
}
process = new Process.start(executable, arguments);
- process.exitHandler = exitHandler;
+ process.onExit = exitHandler;
startTime = new Date.now();
InputStream stdoutStream = process.stdout;
InputStream stderrStream = process.stderr;
StringInputStream stdoutStringStream = new StringInputStream(stdoutStream);
StringInputStream stderrStringStream = new StringInputStream(stderrStream);
- stdoutStringStream.lineHandler =
+ stdoutStringStream.onLine =
makeReadHandler(stdoutStringStream, stdout);
- stderrStringStream.lineHandler =
+ stderrStringStream.onLine =
makeReadHandler(stderrStringStream, stderr);
timeoutTimer = new Timer(timeoutHandler, 1000 * testCase.timeout);
}
@@ -398,7 +398,7 @@ class BatchRunnerProcess {
// if needed.
_executable = testCase.executablePath;
_batchArguments = testCase.batchRunnerArguments;
- _process.exitHandler = (exitCode) {
+ _process.onExit = (exitCode) {
_process.close();
_startProcess(() {
doStartTest(testCase);
@@ -413,7 +413,7 @@ class BatchRunnerProcess {
void terminate() {
if (_process !== null) {
bool closed = false;
- _process.exitHandler = (exitCode) {
+ _process.onExit = (exitCode) {
closed = true;
_process.close();
};
@@ -436,8 +436,8 @@ class BatchRunnerProcess {
_startTime = new Date.now();
_testStdout = new List<String>();
_testStderr = new List<String>();
- _stdoutStream.lineHandler = _readOutput(_stdoutStream, _testStdout);
- _stderrStream.lineHandler = _readOutput(_stderrStream, _testStderr);
+ _stdoutStream.onLine = _readOutput(_stdoutStream, _testStdout);
+ _stderrStream.onLine = _readOutput(_stderrStream, _testStderr);
_timer = new Timer(_timeoutHandler, testCase.timeout * 1000);
var line = _createArgumentsLine(testCase.batchTestArguments);
_process.stdin.write(line.charCodes());
@@ -497,7 +497,7 @@ class BatchRunnerProcess {
}
void _timeoutHandler(ignore) {
- _process.exitHandler = (exitCode) {
+ _process.onExit = (exitCode) {
_process.close();
_startProcess(() {
_reportResult(">>> TEST TIMEOUT");
@@ -512,10 +512,10 @@ class BatchRunnerProcess {
_stderrStream = new StringInputStream(_process.stderr);
_testStdout = new List<String>();
_testStderr = new List<String>();
- _stdoutStream.lineHandler = _readOutput(_stdoutStream, _testStdout);
- _stderrStream.lineHandler = _readOutput(_stderrStream, _testStderr);
- _process.exitHandler = _exitHandler;
- _process.startHandler = then;
+ _stdoutStream.onLine = _readOutput(_stdoutStream, _testStdout);
+ _stderrStream.onLine = _readOutput(_stderrStream, _testStderr);
+ _process.onExit = _exitHandler;
+ _process.onStart = then;
}
}
@@ -628,15 +628,15 @@ class ProcessQueue {
}
if (name == processNames[browserUsed].last()) {
- process.exitHandler = (exitCode) {
+ process.onExit = (exitCode) {
process.close();
_progress.allDone();
};
- process.errorHandler = (error) {
+ process.onError = (error) {
_progress.allDone();
};
} else {
- process.exitHandler = (exitCode) {
+ process.onExit = (exitCode) {
process.close();
};
}
@@ -674,7 +674,7 @@ class ProcessQueue {
// implemented, and add Windows support.
var deletion =
new Process.start('/bin/rm', ['-rf', _temporaryDirectory]);
- deletion.exitHandler = (int exitCode) {
+ deletion.onExit = (int exitCode) {
if (exitCode == 0) {
if (!_listTests) { // Output of --list option is used by scripts.
print('\nTemporary directory $_temporaryDirectory deleted.');

Powered by Google App Engine
This is Rietveld 408576698