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

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

Issue 11275217: Refactor test.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Make test case enqueuing future based. Created 8 years, 1 month 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
Index: tools/testing/dart/test_options.dart
diff --git a/tools/testing/dart/test_options.dart b/tools/testing/dart/test_options.dart
index 97301ea31884cda2f017b8fdf322cb9c9d0c1cfc..1e14042ceb220dfc2404196887b19b27c0970952 100644
--- a/tools/testing/dart/test_options.dart
+++ b/tools/testing/dart/test_options.dart
@@ -416,7 +416,7 @@ Note: currently only implemented for dart2js.''',
validRuntimes = const ['vm', 'drt', 'dartium'];
break;
}
- if (!Contains(config['runtime'], validRuntimes)) {
+ if (!validRuntimes.contains(config['runtime'])) {
isValid = false;
print("Warning: combination of ${config['compiler']} and "
"${config['runtime']} is invalid. Skipping this combination.");
@@ -433,7 +433,7 @@ Note: currently only implemented for dart2js.''',
"${config['shards']} shards");
}
if (config['runtime'] == 'dartium' &&
- Contains(config['compiler'], const ['none', 'dart2dart']) &&
+ const ['none', 'dart2dart'].contains(config['compiler']) &&
config['checked']) {
// TODO(vsm): Set the DART_FLAGS environment appropriately when
// invoking Selenium to support checked mode. It's not clear
@@ -569,9 +569,12 @@ Note: currently only implemented for dart2js.''',
if (configuration['checked']) {
timeout *= 2;
}
- if (Contains(configuration['runtime'],
- const ['ie9', 'ie10', 'ff', 'chrome', 'safari',
- 'opera'])) {
+
+ const BROWSERS = const [
+ 'ie9', 'ie10', 'ff', 'chrome', 'safari', 'opera'
+ ];
+
+ if (BROWSERS.contains(configuration['runtime'])) {
timeout *= 8; // Allow additional time for browser testing to run.
}
break;
@@ -579,7 +582,7 @@ Note: currently only implemented for dart2js.''',
if (configuration['mode'] == 'debug') {
timeout *= 2;
}
- if (Contains(configuration['runtime'], const ['drt', 'dartium'])) {
+ if (const ['drt', 'dartium'].contains(configuration['runtime'])) {
timeout *= 4; // Allow additional time for browser testing to run.
}
break;

Powered by Google App Engine
This is Rietveld 408576698