Chromium Code Reviews| Index: tools/testing/dart/test_suite.dart |
| =================================================================== |
| --- tools/testing/dart/test_suite.dart (revision 24075) |
| +++ tools/testing/dart/test_suite.dart (working copy) |
| @@ -17,7 +17,6 @@ |
| import "dart:async"; |
| import "dart:io"; |
| import "dart:isolate"; |
| -import "dart:uri"; |
| import "drt_updater.dart"; |
| import "multitest.dart"; |
| import "status_file_parser.dart"; |
| @@ -49,7 +48,7 @@ |
| * completes immediately with `null`. |
| */ |
| Future asynchronously(function()) { |
| - if (function == null) return new Future.immediate(null); |
| + if (function == null) return new Future.value(null); |
| var completer = new Completer(); |
| Timer.run(() => completer.complete(function())); |
| @@ -490,7 +489,7 @@ |
| var snapshotPath = TestUtils.absolutePath(new Path(buildDir).join( |
| new Path('dart-sdk/bin/snapshots/' |
| 'utils_wrapper.dart.snapshot'))).toString(); |
| - return [new Uri.fromComponents(scheme: 'file', path: snapshotPath)]; |
| + return [new Uri(scheme: 'file', path: snapshotPath)]; |
| } |
| /** |
| @@ -540,7 +539,7 @@ |
| var completer = new Completer(); |
| var updater = runtimeUpdater(configuration); |
| if (updater == null || updater.updated) { |
| - return new Future.immediate(null); |
| + return new Future.value(null); |
| } |
| assert(updater.isActive); |
| @@ -590,7 +589,7 @@ |
| return dir.exists().then((exists) { |
| if (!exists) { |
| print('Directory containing tests missing: ${suiteDir.toNativePath()}'); |
| - return new Future.immediate(null); |
| + return new Future.value(null); |
| } else { |
| var group = new FutureGroup(); |
| enqueueDirectory(dir, group); |
| @@ -883,7 +882,7 @@ |
| void _createWrapperFile(String dartWrapperFilename, dartLibraryFilename) { |
| File file = new File(dartWrapperFilename); |
| - RandomAccessFile dartWrapper = file.openSync(FileMode.WRITE); |
| + RandomAccessFile dartWrapper = file.openSync(mode: FileMode.WRITE); |
| var usePackageImport = dartLibraryFilename.segments().contains("pkg"); |
| var libraryPathComponent = _createUrlPathFromFile(dartLibraryFilename); |
| @@ -946,7 +945,7 @@ |
| scriptPath = _createUrlPathFromFile(new Path(scriptPath)); |
| // Create the HTML file for the test. |
| - RandomAccessFile htmlTest = new File(htmlPath).openSync(FileMode.WRITE); |
| + RandomAccessFile htmlTest = new File(htmlPath).openSync(mode: FileMode.WRITE); |
|
kustermann
2013/06/17 09:38:38
long line
ricow1
2013/06/17 09:42:47
Done.
|
| String content = null; |
| Path dir = filePath.directoryPath; |
| String nameNoExt = filePath.filenameWithoutExtension; |
| @@ -1729,7 +1728,7 @@ |
| static String testScriptPath = new Options().script; |
| static LastModifiedCache lastModifiedCache = new LastModifiedCache(); |
| static Path currentWorkingDirectory = |
| - new Path(new Directory.current().path); |
| + new Path(Directory.current.path); |
| /** |
| * Creates a directory using a [relativePath] to an existing |
| * [base] directory if that [relativePath] does not already exist. |