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

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

Issue 645533002: Clean up test_runner Command subclass hash/equality. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove stray changes Created 6 years, 2 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/test_suite.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/utils.dart
diff --git a/tools/testing/dart/utils.dart b/tools/testing/dart/utils.dart
index b5b5f879b7dfbd9a3b4f892ee0eed782598aba63..5b2423416397efa6ee6005cb0e361bafcbe53312 100644
--- a/tools/testing/dart/utils.dart
+++ b/tools/testing/dart/utils.dart
@@ -218,7 +218,7 @@ class Locations {
},
'ie10': const {
'windows': 'C:\\Program Files\\Internet Explorer\\iexplore.exe'
- },
+ },
'ie11': const {
'windows': 'C:\\Program Files\\Internet Explorer\\iexplore.exe'
}};
@@ -251,12 +251,16 @@ class HashCodeBuilder {
}
void addJson(Object object) {
- if (object == null || object is num || object is String) {
+ if (object == null || object is num || object is String ||
+ object is Uri || object is bool) {
add(object);
} else if (object is List) {
object.forEach(addJson);
} else if (object is Map) {
- object.forEach((k, v) { addJson(k); addJson(value); });
+ for (var key in object.keys.toList()..sort()) {
+ addJson(key);
+ addJson(object[key]);
+ }
} else {
throw new Exception("Can't build hashcode for non json-like object "
"(${object.runtimeType})");
« no previous file with comments | « tools/testing/dart/test_suite.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698