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

Side by Side Diff: tools/testing/dart/utils.dart

Issue 2903703002: Tighten types in test.dart even more. (Closed)
Patch Set: Play nicer with strong mode. Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « tools/testing/dart/test_suite.dart ('k') | tools/testing/dart/vendored_pkg/args/args.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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:convert'; 8 import 'dart:convert';
9 9
10 import 'path.dart'; 10 import 'path.dart';
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 // TODO(kustermann,ricow): As soon we have a debug log we should log 174 // TODO(kustermann,ricow): As soon we have a debug log we should log
175 // invalid utf8-encoded input to the log. 175 // invalid utf8-encoded input to the log.
176 // Currently invalid bytes will be replaced by a replacement character. 176 // Currently invalid bytes will be replaced by a replacement character.
177 String decodeUtf8(List<int> bytes) { 177 String decodeUtf8(List<int> bytes) {
178 return UTF8.decode(bytes, allowMalformed: true); 178 return UTF8.decode(bytes, allowMalformed: true);
179 } 179 }
180 180
181 class Locations { 181 class Locations {
182 static String getBrowserLocation( 182 static String getBrowserLocation(
183 String browserName, Map<String, String> globalConfiguration) { 183 String browserName, Map<String, dynamic> globalConfiguration) {
184 var location = globalConfiguration[browserName]; 184 var location = globalConfiguration[browserName] as String;
185 if (location != null && location != '') { 185 if (location != null && location != '') {
186 return location; 186 return location;
187 } 187 }
188 var browserLocations = { 188 var browserLocations = {
189 'firefox': const { 189 'firefox': const {
190 'windows': 'C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe', 190 'windows': 'C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe',
191 'linux': 'firefox', 191 'linux': 'firefox',
192 'macos': '/Applications/Firefox.app/Contents/MacOS/firefox' 192 'macos': '/Applications/Firefox.app/Contents/MacOS/firefox'
193 }, 193 },
194 'chrome': const { 194 'chrome': const {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 class UniqueObject { 304 class UniqueObject {
305 static int _nextId = 1; 305 static int _nextId = 1;
306 final int _hashCode; 306 final int _hashCode;
307 307
308 int get hashCode => _hashCode; 308 int get hashCode => _hashCode;
309 operator ==(Object other) => 309 operator ==(Object other) =>
310 other is UniqueObject && _hashCode == other._hashCode; 310 other is UniqueObject && _hashCode == other._hashCode;
311 311
312 UniqueObject() : _hashCode = ++_nextId; 312 UniqueObject() : _hashCode = ++_nextId;
313 } 313 }
OLDNEW
« no previous file with comments | « tools/testing/dart/test_suite.dart ('k') | tools/testing/dart/vendored_pkg/args/args.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698