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

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

Issue 9597015: Update Timer API to take the callback as the last parameter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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/io/TimerTest.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 3c5bddbcbeb49225574c0318f6eaf1d05f76fd98..feaea15d3dc62998b9c9dbc2169e036d68657360 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -565,7 +565,7 @@ class RunningProcess {
makeReadHandler(stdoutStringStream, stdout);
stderrStringStream.onLine =
makeReadHandler(stderrStringStream, stderr);
- timeoutTimer = new Timer(timeoutHandler, 1000 * testCase.timeout);
+ timeoutTimer = new Timer(1000 * testCase.timeout, timeoutHandler);
}
void timeoutHandler(Timer unusedTimer) {
@@ -640,7 +640,7 @@ class BatchRunnerProcess {
// In case the run_selenium process didn't close, kill it after 30s
bool shutdownMillisecs = 30000;
- new Timer((e) { if (!closed) _process.kill(); }, shutdownMillisecs);
+ new Timer(shutdownMillisecs, (e) { if (!closed) _process.kill(); });
} else {
_process.kill();
}
@@ -655,7 +655,7 @@ class BatchRunnerProcess {
_stderrDrained = false;
_stdoutStream.onLine = _readStdout(_stdoutStream, _testStdout);
_stderrStream.onLine = _readStderr(_stderrStream, _testStderr);
- _timer = new Timer(_timeoutHandler, testCase.timeout * 1000);
+ _timer = new Timer(testCase.timeout * 1000, _timeoutHandler);
var line = _createArgumentsLine(testCase.batchTestArguments);
_process.stdin.write(line.charCodes());
}
« no previous file with comments | « tests/standalone/src/io/TimerTest.dart ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698