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

Side by Side Diff: tools/testing/dart/runtime_configuration.dart

Issue 841193003: cleanup to tools/testing/dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: one last bit Created 5 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/testing/dart/record_and_replay.dart ('k') | tools/testing/dart/status_expression.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 library runtime_configuration; 5 library runtime_configuration;
6 6
7 import 'compiler_configuration.dart' show
8 CommandArtifact;
9
10 // TODO(ahe): Remove this import, we can precompute all the values required 7 // TODO(ahe): Remove this import, we can precompute all the values required
11 // from TestSuite once the refactoring is complete. 8 // from TestSuite once the refactoring is complete.
12 import 'test_suite.dart' show 9 import 'test_suite.dart' show
13 TestSuite; 10 TestSuite;
14 11
15 import 'test_runner.dart' show 12 import 'lib/command.dart' show
16 Command, 13 Command,
17 CommandBuilder; 14 CommandBuilder;
18 15
16 /// Grouping of a command with its expected result.
17 class CommandArtifact {
18 final List<Command> commands;
19
20 /// Expected result of running [command].
21 final String filename;
22
23 /// MIME type of [filename].
24 final String mimeType;
25
26 CommandArtifact(this.commands, this.filename, this.mimeType);
27 }
28
19 // TODO(ahe): I expect this class will become abstract very soon. 29 // TODO(ahe): I expect this class will become abstract very soon.
20 class RuntimeConfiguration { 30 class RuntimeConfiguration {
21 // TODO(ahe): Remove this constructor and move the switch to 31 // TODO(ahe): Remove this constructor and move the switch to
22 // test_options.dart. We probably want to store an instance of 32 // test_options.dart. We probably want to store an instance of
23 // [RuntimeConfiguration] in [configuration] there. 33 // [RuntimeConfiguration] in [configuration] there.
24 factory RuntimeConfiguration(Map configuration) { 34 factory RuntimeConfiguration(Map configuration) {
25 String runtime = configuration['runtime']; 35 String runtime = configuration['runtime'];
26 switch (runtime) { 36 switch (runtime) {
27 case 'ContentShellOnAndroid': 37 case 'ContentShellOnAndroid':
28 case 'DartiumOnAndroid': 38 case 'DartiumOnAndroid':
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration { 232 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration {
223 List<Command> computeRuntimeCommands( 233 List<Command> computeRuntimeCommands(
224 TestSuite suite, 234 TestSuite suite,
225 CommandBuilder commandBuilder, 235 CommandBuilder commandBuilder,
226 CommandArtifact artifact, 236 CommandArtifact artifact,
227 List<String> arguments, 237 List<String> arguments,
228 Map<String, String> environmentOverrides) { 238 Map<String, String> environmentOverrides) {
229 throw "Unimplemented runtime '$runtimeType'"; 239 throw "Unimplemented runtime '$runtimeType'";
230 } 240 }
231 } 241 }
OLDNEW
« no previous file with comments | « tools/testing/dart/record_and_replay.dart ('k') | tools/testing/dart/status_expression.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698