Chromium Code Reviews| 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..a72c25767f38f4a32056bbae4ff1e8caf92ca0dd 100644 |
| --- a/tools/testing/dart/record_and_replay.dart |
| +++ b/tools/testing/dart/record_and_replay.dart |
| @@ -91,11 +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<Map<String, Map<String, dynamic>>>; |
|
Siggi Cherem (dart-lang)
2017/05/30 20:48:39
same here: looks to me like this would fail in str
Bob Nystrom
2017/05/30 21:01:46
Done.
|
| _commandOutputRecordings = {}; |
| for (var commandRecording in commandRecordings) { |
| - var key = _indexKey(commandRecording['command']['executable'], |
| - commandRecording['command']['arguments'].join(' ')); |
| + var key = _indexKey(commandRecording['command']['executable'] as String, |
| + (commandRecording['command']['arguments'] as List).join(' ')); |
| _commandOutputRecordings[key] = commandRecording['command_output']; |
| } |
| } |
| @@ -115,15 +116,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; |