Chromium Code Reviews| Index: tools/testing/dart/test_suite.dart |
| =================================================================== |
| --- tools/testing/dart/test_suite.dart (revision 35513) |
| +++ tools/testing/dart/test_suite.dart (working copy) |
| @@ -1880,6 +1880,7 @@ |
| static Path dartDir = new Path(new File(testScriptPath).absolute.path) |
| .directoryPath.directoryPath; |
| + |
|
Bill Hesse
2014/04/29 17:51:55
In the class below this, we don't have a double li
ricow1
2014/04/30 06:51:01
Done.
|
| /** |
| * Creates a directory using a [relativePath] to an existing |
| * [base] directory if that [relativePath] does not already exist. |
| @@ -1917,6 +1918,17 @@ |
| .pipe(new File(dest.toNativePath()).openWrite()); |
| } |
| + static Future isContentEqual(Path source, Path dest) { |
| + return new File(source.toNativePath()).readAsString() |
| + .then((srcString) { |
| + return new File(dest.toNativePath()).readAsString() |
| + .then((destString) => srcString == destString); |
| + }) |
| + .catchError((error) { |
| + return false; |
| + }); |
| + } |
| + |
| static Future copyDirectory(String source, String dest) { |
| source = new Path(source).toNativePath(); |
| dest = new Path(dest).toNativePath(); |
| @@ -2145,6 +2157,11 @@ |
| } |
| return path; |
| } |
| + |
| + static String cachedOutputFile(String outputFile) { |
| + return "$outputFile.cached_output"; |
| + } |
| + |
| } |
| class SummaryReport { |