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

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

Issue 2903703002: Tighten types in test.dart even more. (Closed)
Patch Set: Play nicer with strong mode. 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 | « tools/testing/dart/package_testing_support.dart ('k') | tools/testing/dart/reset_safari.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/record_and_replay.dart
diff --git a/tools/testing/dart/record_and_replay.dart b/tools/testing/dart/record_and_replay.dart
index 6f29037b2e5423cc8610b1119e54bd15f396e1f0..4ff380b5392cce9c8892e47deab8eb57b4d4b109 100644
--- a/tools/testing/dart/record_and_replay.dart
+++ b/tools/testing/dart/record_and_replay.dart
@@ -91,12 +91,12 @@ class TestCaseOutputArchive {
void loadFromPath(Path recordingPath) {
var file = new File(recordingPath.toNativePath());
- var commandRecordings = JSON.decode(file.readAsStringSync());
+ var commandRecordings = JSON.decode(file.readAsStringSync()) as List;
_commandOutputRecordings = {};
for (var commandRecording in commandRecordings) {
- var key = _indexKey(commandRecording['command']['executable'],
- commandRecording['command']['arguments'].join(' '));
- _commandOutputRecordings[key] = commandRecording['command_output'];
+ var key = _indexKey(commandRecording['command']['executable'] as String,
+ (commandRecording['command']['arguments'] as List).join(' '));
+ _commandOutputRecordings[key] = commandRecording['command_output'] as Map;
}
}
@@ -115,15 +115,15 @@ class TestCaseOutputArchive {
exit(42);
}
- double seconds = command_output['duration'];
+ double seconds = command_output['duration'] as double;
var duration = new Duration(
seconds: seconds.round(), milliseconds: (seconds / 1000).round());
var commandOutput = createCommandOutput(
command,
- command_output['exit_code'],
- command_output['did_timeout'],
- UTF8.encode(command_output['stdout']),
- UTF8.encode(command_output['stderr']),
+ command_output['exit_code'] as int,
+ command_output['did_timeout'] as bool,
+ UTF8.encode(command_output['stdout'] as String),
+ UTF8.encode(command_output['stderr'] as String),
duration,
false);
return commandOutput;
« no previous file with comments | « tools/testing/dart/package_testing_support.dart ('k') | tools/testing/dart/reset_safari.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698