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

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: 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 | « tools/testing/dart/status_file_parser.dart ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_runner.dart
diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart
index c760ceb8452b86a3ba6511176ba5d91a89aef969..757c1b585555dcd43a771adbaba1e7408a36f023 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -348,15 +348,15 @@ class RunningProcess {
command.executable = command.executable.replaceAll('/', '\\');
}
process = new Process.start(command.executable, command.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);
}
@@ -404,7 +404,7 @@ class BatchRunnerProcess {
// if needed.
_executable = testCase.commands.last().executable;
_batchArguments = testCase.batchRunnerArguments;
- _process.exitHandler = (exitCode) {
+ _process.onExit = (exitCode) {
_process.close();
_startProcess(() {
doStartTest(testCase);
@@ -419,7 +419,7 @@ class BatchRunnerProcess {
void terminate() {
if (_process !== null) {
bool closed = false;
- _process.exitHandler = (exitCode) {
+ _process.onExit = (exitCode) {
closed = true;
_process.close();
};
@@ -442,8 +442,8 @@ class BatchRunnerProcess {
_startTime = new Date.now();
_testStdout = [];
_testStderr = [];
- _stdoutStream.lineHandler = _readStdout(_stdoutStream, _testStdout);
- _stderrStream.lineHandler = _makeReadHandler(_stderrStream, _testStderr);
+ _stdoutStream.onLine = _readStdout(_stdoutStream, _testStdout);
+ _stderrStream.onLine = _makeReadHandler(_stderrStream, _testStderr);
_timer = new Timer(_timeoutHandler, testCase.timeout * 1000);
var line = _createArgumentsLine(testCase.batchTestArguments);
_process.stdin.write(line.charCodes());
@@ -535,7 +535,7 @@ class BatchRunnerProcess {
}
void _timeoutHandler(ignore) {
- _process.exitHandler = (exitCode) {_
+ _process.onExit = (exitCode) {
reportResult(">>> TEST TIMEOUT");
_process.close();
_startProcess();
@@ -549,10 +549,10 @@ class BatchRunnerProcess {
_stderrStream = new StringInputStream(_process.stderr);
_testStdout = [];
_testStderr = [];
- _stdoutStream.lineHandler = _readStdout(_stdoutStream, _testStdout);
- _stderrStream.lineHandler =_makeReadHandler(_stderrStream, _testStderr);
- _process.exitHandler = _exitHandler;
- _process.startHandler = then;
+ _stdoutStream.onLine = _readStdout(_stdoutStream, _testStdout);
+ _stderrStream.onLine =_makeReadHandler(_stderrStream, _testStderr);
+ _process.onExit = _exitHandler;
+ _process.onStart = then;
}
}
@@ -665,15 +665,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();
};
}
@@ -711,7 +711,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.');
« no previous file with comments | « tools/testing/dart/status_file_parser.dart ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698