| Index: tools/testing/dart/test_runner.dart
|
| ===================================================================
|
| --- tools/testing/dart/test_runner.dart (revision 24095)
|
| +++ tools/testing/dart/test_runner.dart (working copy)
|
| @@ -17,6 +17,7 @@
|
| // CommandOutput.exitCode in subclasses of CommandOutput.
|
| import "dart:io" as io;
|
| import "dart:isolate";
|
| +import "dart:uri";
|
| import "browser_controller.dart";
|
| import "http_server.dart" as http_server;
|
| import "status_file_parser.dart";
|
| @@ -121,7 +122,7 @@
|
|
|
| String toString() => commandLine;
|
|
|
| - Future<bool> get outputIsUpToDate => new Future.value(false);
|
| + Future<bool> get outputIsUpToDate => new Future.immediate(false);
|
| io.Path get expectedOutputFile => null;
|
| bool get isPixelTest => false;
|
| }
|
| @@ -139,19 +140,19 @@
|
| : super(executable, arguments);
|
|
|
| Future<bool> get outputIsUpToDate {
|
| - if (_neverSkipCompilation) return new Future.value(false);
|
| + if (_neverSkipCompilation) return new Future.immediate(false);
|
|
|
| Future<List<Uri>> readDepsFile(String path) {
|
| var file = new io.File(new io.Path(path).toNativePath());
|
| if (!file.existsSync()) {
|
| - return new Future.value(null);
|
| + return new Future.immediate(null);
|
| }
|
| return file.readAsLines().then((List<String> lines) {
|
| var dependencies = new List<Uri>();
|
| for (var line in lines) {
|
| line = line.trim();
|
| if (line.length > 0) {
|
| - dependencies.add(Uri.parse(line));
|
| + dependencies.add(new Uri(line));
|
| }
|
| }
|
| return dependencies;
|
| @@ -162,7 +163,7 @@
|
| if (dependencies != null) {
|
| dependencies.addAll(_bootstrapDependencies);
|
| var jsOutputLastModified = TestUtils.lastModifiedCache.getLastModified(
|
| - new Uri(scheme: 'file', path: _outputFile));
|
| + new Uri.fromComponents(scheme: 'file', path: _outputFile));
|
| if (jsOutputLastModified != null) {
|
| for (var dependency in dependencies) {
|
| var dependencyLastModified =
|
| @@ -1027,13 +1028,12 @@
|
| compilationSkipped = true;
|
| _commandComplete(0);
|
| } else {
|
| - var processEnvironment = _createProcessEnvironment();
|
| + var processOptions = _createProcessOptions();
|
| var commandArguments = _modifySeleniumTimeout(command.arguments,
|
| testCase.timeout);
|
| - Future processFuture =
|
| - io.Process.start(command.executable,
|
| - commandArguments,
|
| - environment: processEnvironment);
|
| + Future processFuture = io.Process.start(command.executable,
|
| + commandArguments,
|
| + processOptions);
|
| processFuture.then((io.Process process) {
|
| // Close stdin so that tests that try to block on input will fail.
|
| process.stdin.close();
|
| @@ -1087,18 +1087,19 @@
|
| source.listen(destination.addAll);
|
| }
|
|
|
| - Map<String, String> _createProcessEnvironment() {
|
| + io.ProcessOptions _createProcessOptions() {
|
| var baseEnvironment = command.environment != null ?
|
| command.environment : io.Platform.environment;
|
| - var environment = new Map<String, String>.from(baseEnvironment);
|
| - environment['DART_CONFIGURATION'] =
|
| + io.ProcessOptions options = new io.ProcessOptions();
|
| + options.environment = new Map<String, String>.from(baseEnvironment);
|
| + options.environment['DART_CONFIGURATION'] =
|
| TestUtils.configurationDir(testCase.configuration);
|
|
|
| for (var excludedEnvironmentVariable in EXCLUDED_ENVIRONMENT_VARIABLES) {
|
| - environment.remove(excludedEnvironmentVariable);
|
| + options.environment.remove(excludedEnvironmentVariable);
|
| }
|
|
|
| - return environment;
|
| + return options;
|
| }
|
| }
|
|
|
| @@ -1158,7 +1159,7 @@
|
| }
|
|
|
| Future terminate() {
|
| - if (_process == null) return new Future.value(true);
|
| + if (_process == null) return new Future.immediate(true);
|
| Completer completer = new Completer();
|
| Timer killTimer;
|
| _processExitHandler = (_) {
|
| @@ -1662,7 +1663,7 @@
|
| io.exit(1);
|
| });
|
| }
|
| - return new Future.value(_browserTestRunners[runtime]);
|
| + return new Future.immediate(_browserTestRunners[runtime]);
|
| }
|
|
|
| void _startBrowserControllerTest(var test) {
|
|
|