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

Unified Diff: tools/testing/dart/test_suite.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/test_runner.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_suite.dart
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index a8cfc7fbd8664a26e60ec2e377577abadac58e45..1f11938fd331d80bd17301c282d48e895d906d9c 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -53,18 +53,18 @@ class CCTestListerIsolate extends Isolate {
var p = new Process.start(runnerPath, ["--list"]);
StringInputStream stdoutStream = new StringInputStream(p.stdout);
List<String> tests = new List<String>();
- stdoutStream.lineHandler = () {
+ stdoutStream.onLine = () {
String line = stdoutStream.readLine();
while (line != null) {
tests.add(line);
line = stdoutStream.readLine();
}
};
- p.errorHandler = (error) {
+ p.onError = (error) {
print("Failed to list tests: $runnerPath --list");
replyTo.send("");
};
- p.exitHandler = (code) {
+ p.onExit = (code) {
if (code < 0) {
print("Failed to list tests: $runnerPath --list");
replyTo.send("");
@@ -263,20 +263,19 @@ class StandardTestSuite implements TestSuite {
void processDirectory() {
directoryPath = '$dartDir/$directoryPath';
Directory dir = new Directory(directoryPath);
- dir.errorHandler = (s) {
+ dir.onError = (s) {
throw s;
};
- dir.existsHandler = (bool exists) {
+ dir.exists((bool exists) {
if (!exists) {
print('Directory containing tests not found: $directoryPath');
directoryListingDone(false);
} else {
- dir.fileHandler = processFile;
- dir.doneHandler = directoryListingDone;
+ dir.onFile = processFile;
+ dir.onDone = directoryListingDone;
dir.list(recursive: listRecursively());
}
- };
- dir.exists();
+ });
}
void enqueueTestCaseFromTestInformation(TestInformation info) {
@@ -888,11 +887,11 @@ class DartcCompilationTestSuite extends StandardTestSuite {
Directory dir = new Directory("$directoryPath/$testDir");
if (dir.existsSync()) {
activityStarted();
- dir.errorHandler = (s) {
+ dir.onError = (s) {
throw s;
};
- dir.fileHandler = processFile;
- dir.doneHandler = (ignore) => activityCompleted();
+ dir.onFile = processFile;
+ dir.onDone = (ignore) => activityCompleted();
dir.list(recursive: listRecursively());
}
}
@@ -955,11 +954,11 @@ class JUnitTestSuite implements TestSuite {
directoryPath = '$dartDir/$directoryPath';
Directory dir = new Directory(directoryPath);
- dir.errorHandler = (s) {
+ dir.onError = (s) {
throw s;
};
- dir.fileHandler = processFile;
- dir.doneHandler = createTest;
+ dir.onFile = processFile;
+ dir.onDone = createTest;
dir.list(recursive: true);
}
« no previous file with comments | « tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698