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

Unified Diff: tools/testing/dart/http_server.dart

Issue 2919573003: Revert "Revert "Replace the configuration map with a typed object."" (Closed)
Patch Set: Another test fix. Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/testing/dart/expectation_set.dart ('k') | tools/testing/dart/launch_browser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/http_server.dart
diff --git a/tools/testing/dart/http_server.dart b/tools/testing/dart/http_server.dart
index 53538fd579f8e42f73682e576e71dd56d1379bb1..cfc70edfc61f00b898f697ac3a15b2a41e97edb8 100644
--- a/tools/testing/dart/http_server.dart
+++ b/tools/testing/dart/http_server.dart
@@ -2,17 +2,16 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library http_server;
-
import 'dart:async';
+import 'dart:convert' show HtmlEscape;
import 'dart:io';
-import 'dart:convert' show HtmlEscape;
+import 'package:package_resolver/package_resolver.dart';
-import 'test_suite.dart'; // For TestUtils.
+import 'configuration.dart';
+import 'test_suite.dart';
import 'vendored_pkg/args/args.dart';
import 'utils.dart';
-import 'package:package_resolver/package_resolver.dart';
class DispatchingServer {
HttpServer server;
@@ -94,7 +93,7 @@ void main(List<String> arguments) {
var servers = new TestingServers(
args['build-directory'] as String,
args['csp'] as bool,
- args['runtime'] as String,
+ Runtime.find(args['runtime'] as String),
null,
args['package-root'] as String,
args['packages'] as String);
@@ -132,12 +131,12 @@ class TestingServers {
Uri _packageRoot;
Uri _packages;
final bool useContentSecurityPolicy;
- final String runtime;
+ final Runtime runtime;
DispatchingServer _server;
SyncPackageResolver _resolver;
TestingServers(String buildDirectory, this.useContentSecurityPolicy,
- [String this.runtime = 'none',
+ [this.runtime = Runtime.none,
String dartDirectory,
String packageRoot,
String packages]) {
@@ -194,7 +193,7 @@ class TestingServers {
'-c',
crossOriginPort,
'--build-directory=$buildDirectory',
- '--runtime=$runtime'
+ '--runtime=${runtime.name}'
];
if (useContentSecurityPolicy) {
command.add('--csp');
« no previous file with comments | « tools/testing/dart/expectation_set.dart ('k') | tools/testing/dart/launch_browser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698