| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library utils; | 5 library utils; |
| 6 | 6 |
| 7 import 'dart:io'; | 7 import 'dart:io'; |
| 8 import 'dart:math' show min; | 8 import 'dart:math' show min; |
| 9 import 'dart:convert'; | 9 import 'dart:convert'; |
| 10 | 10 |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 'linux': 'client/tests/dartium/chrome' | 206 'linux': 'client/tests/dartium/chrome' |
| 207 }, | 207 }, |
| 208 'safari': const { | 208 'safari': const { |
| 209 'macos': '/Applications/Safari.app/Contents/MacOS/Safari' | 209 'macos': '/Applications/Safari.app/Contents/MacOS/Safari' |
| 210 }, | 210 }, |
| 211 'ie9': const { | 211 'ie9': const { |
| 212 'windows': 'C:\\Program Files\\Internet Explorer\\iexplore.exe' | 212 'windows': 'C:\\Program Files\\Internet Explorer\\iexplore.exe' |
| 213 }, | 213 }, |
| 214 'ie10': const { | 214 'ie10': const { |
| 215 'windows': 'C:\\Program Files\\Internet Explorer\\iexplore.exe' | 215 'windows': 'C:\\Program Files\\Internet Explorer\\iexplore.exe' |
| 216 }, |
| 217 'ie11': const { |
| 218 'windows': 'C:\\Program Files\\Internet Explorer\\iexplore.exe' |
| 216 }}; | 219 }}; |
| 217 browserLocations['ff'] = browserLocations['firefox']; | 220 browserLocations['ff'] = browserLocations['firefox']; |
| 218 | 221 |
| 219 assert(browserLocations[browserName] != null); | 222 assert(browserLocations[browserName] != null); |
| 220 location = browserLocations[browserName][Platform.operatingSystem]; | 223 location = browserLocations[browserName][Platform.operatingSystem]; |
| 221 if (location != null) { | 224 if (location != null) { |
| 222 return location; | 225 return location; |
| 223 } else { | 226 } else { |
| 224 throw '$browserName not supported on ${Platform.operatingSystem}'; | 227 throw '$browserName not supported on ${Platform.operatingSystem}'; |
| 225 } | 228 } |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 | 293 |
| 291 class UniqueObject { | 294 class UniqueObject { |
| 292 static int _nextId = 1; | 295 static int _nextId = 1; |
| 293 final int _hashCode; | 296 final int _hashCode; |
| 294 | 297 |
| 295 int get hashCode => _hashCode; | 298 int get hashCode => _hashCode; |
| 296 operator==(other) => other is UniqueObject && _hashCode == other._hashCode; | 299 operator==(other) => other is UniqueObject && _hashCode == other._hashCode; |
| 297 | 300 |
| 298 UniqueObject() : _hashCode = ++_nextId; | 301 UniqueObject() : _hashCode = ++_nextId; |
| 299 } | 302 } |
| OLD | NEW |