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

Unified Diff: test/perf/update_json.dart

Issue 55143003: webui fixes for 0.8.9 (Closed) Base URL: git@github.com:dart-lang/web-ui.git@master
Patch Set: Created 7 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
« pubspec.yaml ('K') | « test/perf/perf.dart ('k') | test/run_all.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/perf/update_json.dart
diff --git a/test/perf/update_json.dart b/test/perf/update_json.dart
index 1fd4f6b236b8f19cdbe7023b61d9dc8c1224e84e..a4c72ebb071b24e42bf5efb2c84903c70a2afe29 100755
--- a/test/perf/update_json.dart
+++ b/test/perf/update_json.dart
@@ -11,11 +11,10 @@ library test.perf.update_json;
import 'dart:async';
import 'dart:io';
-import 'dart:json' as json;
+import 'dart:convert';
import 'dart:math' as math;
main() {
- var args = new Options().arguments;
if (args.length < 2) {
print('update_json.dart: A simple script that updates a target json file '
'with the new values from another json file. ');
@@ -29,8 +28,8 @@ main() {
var file2 = new File(path2).readAsStringSync();
var results = [];
- var map1 = json.parse(file1);
- var map2 = json.parse(file2);
+ var map1 = JSON.decode(file1);
+ var map2 = JSON.decode(file2);
for (var key in map1.keys) {
if (map1[key] != null) {
@@ -39,7 +38,7 @@ main() {
}
print('updating $path2...');
- _writeFile(path2, json.stringify(map2));
+ _writeFile(path2, JSON.encode(map2));
}
Future _writeFile(String path, String text) {
« pubspec.yaml ('K') | « test/perf/perf.dart ('k') | test/run_all.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698