| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:io'; | 5 import 'dart:io'; |
| 6 | 6 |
| 7 import 'command.dart'; | 7 import 'command.dart'; |
| 8 import 'compiler_configuration.dart'; | 8 import 'compiler_configuration.dart'; |
| 9 import 'configuration.dart'; | 9 import 'configuration.dart'; |
| 10 // TODO(ahe): Remove this import, we can precompute all the values required | 10 // TODO(ahe): Remove this import, we can precompute all the values required |
| 11 // from TestSuite once the refactoring is complete. | 11 // from TestSuite once the refactoring is complete. |
| 12 import 'test_suite.dart'; | 12 import 'test_suite.dart'; |
| 13 import 'utils.dart'; | 13 import 'utils.dart'; |
| 14 | 14 |
| 15 /// Describes the commands to run a given test case or its compiled output. | 15 /// Describes the commands to run a given test case or its compiled output. |
| 16 /// | 16 /// |
| 17 /// A single runtime configuration object exists per test suite, and is thus | 17 /// A single runtime configuration object exists per test suite, and is thus |
| 18 /// shared between multiple test cases, it should not be mutated after | 18 /// shared between multiple test cases, it should not be mutated after |
| 19 /// construction. | 19 /// construction. |
| 20 abstract class RuntimeConfiguration { | 20 abstract class RuntimeConfiguration { |
| 21 factory RuntimeConfiguration(Configuration configuration) { | 21 factory RuntimeConfiguration(Configuration configuration) { |
| 22 switch (configuration.runtime) { | 22 switch (configuration.runtime) { |
| 23 case Runtime.contentShellOnAndroid: | 23 case Runtime.contentShellOnAndroid: |
| 24 case Runtime.dartiumOnAndroid: | |
| 25 case Runtime.chrome: | 24 case Runtime.chrome: |
| 26 case Runtime.chromeOnAndroid: | 25 case Runtime.chromeOnAndroid: |
| 27 case Runtime.dartium: | |
| 28 case Runtime.firefox: | 26 case Runtime.firefox: |
| 29 case Runtime.ie11: | 27 case Runtime.ie11: |
| 30 case Runtime.ie10: | 28 case Runtime.ie10: |
| 31 case Runtime.ie9: | 29 case Runtime.ie9: |
| 32 case Runtime.opera: | 30 case Runtime.opera: |
| 33 case Runtime.safari: | 31 case Runtime.safari: |
| 34 case Runtime.safariMobileSim: | 32 case Runtime.safariMobileSim: |
| 35 // TODO(ahe): Replace this with one or more browser runtimes. | 33 // TODO(ahe): Replace this with one or more browser runtimes. |
| 36 return new DummyRuntimeConfiguration(); | 34 return new DummyRuntimeConfiguration(); |
| 37 | 35 |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 // TODO(ahe): Remove this class. | 342 // TODO(ahe): Remove this class. |
| 345 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration { | 343 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration { |
| 346 List<Command> computeRuntimeCommands( | 344 List<Command> computeRuntimeCommands( |
| 347 TestSuite suite, | 345 TestSuite suite, |
| 348 CommandArtifact artifact, | 346 CommandArtifact artifact, |
| 349 List<String> arguments, | 347 List<String> arguments, |
| 350 Map<String, String> environmentOverrides) { | 348 Map<String, String> environmentOverrides) { |
| 351 throw "Unimplemented runtime '$runtimeType'"; | 349 throw "Unimplemented runtime '$runtimeType'"; |
| 352 } | 350 } |
| 353 } | 351 } |
| OLD | NEW |