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

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

Issue 2917843002: Handle "ff" as a runtime name in status files. (Closed)
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/environment.dart
diff --git a/tools/testing/dart/environment.dart b/tools/testing/dart/environment.dart
index d9458552770680b0add320b70a19707a1770d37e..1ee7057b24b305a01cf7bfbb791f654bcf802a9c 100644
--- a/tools/testing/dart/environment.dart
+++ b/tools/testing/dart/environment.dart
@@ -27,7 +27,7 @@ final _variables = {
"jscl": new _Variable.bool((c) => c.runtime.isJSCommandLine),
"minified": new _Variable.bool((c) => c.isMinified),
"mode": new _Variable((c) => c.mode.name, Mode.names),
- "runtime": new _Variable((c) => c.runtime.name, Runtime.names),
+ "runtime": new _Variable(_runtimeName, Runtime.names),
"strong": new _Variable.bool((c) => c.isStrong),
"system": new _Variable((c) => c.system.name, System.names),
"unchecked": new _Variable.bool((c) => !c.isChecked),
@@ -35,6 +35,16 @@ final _variables = {
"use_sdk": new _Variable.bool((c) => c.useSdk)
};
+/// Gets the name of the runtime as it appears in status files.
+String _runtimeName(Configuration configuration) {
+ // TODO(rnystrom): Handle "ff" being used as the name for firefox. We don't
+ // want to make the Runtime itself use that as the name because it appears
+ // elsewhere in test.dart and we want those other places to show "firefox".
+ if (configuration.runtime == Runtime.firefox) return 'ff';
+
+ return configuration.runtime.name;
+}
+
/// Defines the variables that are available for use inside a status file
/// section header.
///
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698