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

Unified Diff: utils/testrunner/utils.dart

Issue 12316036: Merge IO v2 branch to bleeding edge (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased to r18818 Created 7 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 | « utils/pub/oauth2.dart ('k') | utils/tests/pub/oauth2_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/testrunner/utils.dart
diff --git a/utils/testrunner/utils.dart b/utils/testrunner/utils.dart
index e8f81d4a9461aef0c339740ee2117cc20eee3ef3..3bd7efb169b095307d89646a428f397700369566 100644
--- a/utils/testrunner/utils.dart
+++ b/utils/testrunner/utils.dart
@@ -70,21 +70,24 @@ void buildFileList(List dirs, RegExp filePat, bool recurse,
Directory d = new Directory(path);
if (d.existsSync()) {
++dirCount;
- var lister = d.list(recursive: recurse);
- lister.onFile = (file) {
- if (filePat.hasMatch(file)) {
- if (excludePat == null || !excludePat.hasMatch(file)) {
- if (includeSymLinks || file.startsWith(path)) {
- files.add(file);
+ d.list(recursive: recurse).listen(
+ (entity) {
+ if (entity is File) {
+ var file = entity.name;
+ if (filePat.hasMatch(file)) {
+ if (excludePat == null || !excludePat.hasMatch(file)) {
+ if (includeSymLinks || file.startsWith(path)) {
+ files.add(file);
+ }
+ }
+ }
}
- }
- }
- };
- lister.onDone = (complete) {
- if (complete && --dirCount == 0) {
- onComplete(files);
- }
- };
+ },
+ onDone: () {
+ if (complete && --dirCount == 0) {
+ onComplete(files);
+ }
+ });
} else { // Does not exist.
print('$path does not exist.');
}
« no previous file with comments | « utils/pub/oauth2.dart ('k') | utils/tests/pub/oauth2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698