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

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

Issue 2901923003: Replace the configuration map with a typed object. (Closed)
Patch Set: Revise. 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/configuration.dart ('k') | tools/testing/dart/environment.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/drt_updater.dart
diff --git a/tools/testing/dart/drt_updater.dart b/tools/testing/dart/drt_updater.dart
index befc49f40b786bb20717aca2c2d2c4745aeef2fe..ea466de0c2eec8f41f35903c2804c1fc7cb88221 100644
--- a/tools/testing/dart/drt_updater.dart
+++ b/tools/testing/dart/drt_updater.dart
@@ -4,12 +4,11 @@
// TODO(antonm): rename to something like test_runner_updater.
-library drt_updater;
+import 'dart:async';
+import 'dart:io';
-import "dart:async";
-import "dart:io";
-
-import "test_suite.dart";
+import 'configuration.dart';
+import 'test_suite.dart';
typedef void Action();
@@ -70,16 +69,16 @@ class _DartiumUpdater {
_DartiumUpdater _contentShellUpdater;
_DartiumUpdater _dartiumUpdater;
-_DartiumUpdater runtimeUpdater(Map configuration) {
- var runtime = configuration['runtime'] as String;
- if (runtime == 'drt' && configuration['drt'] == '') {
+_DartiumUpdater runtimeUpdater(
+ Runtime runtime, String drtPath, String dartiumPath) {
+ if (runtime == Runtime.drt && drtPath == null) {
// Download the default content shell from Google Storage.
if (_contentShellUpdater == null) {
_contentShellUpdater =
new _DartiumUpdater('Content Shell', 'tools/get_archive.py', 'drt');
}
return _contentShellUpdater;
- } else if (runtime == 'dartium' && configuration['dartium'] == '') {
+ } else if (runtime == Runtime.dartium && dartiumPath == null) {
// Download the default Dartium from Google Storage.
if (_dartiumUpdater == null) {
_dartiumUpdater = new _DartiumUpdater(
« no previous file with comments | « tools/testing/dart/configuration.dart ('k') | tools/testing/dart/environment.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698