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

Unified Diff: samples/third_party/dromaeo/tests/dom-modify-html.dart

Issue 23596007: Remove usage of dart:json. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase. Created 7 years, 4 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
Index: samples/third_party/dromaeo/tests/dom-modify-html.dart
diff --git a/samples/third_party/dromaeo/tests/dom-modify-html.dart b/samples/third_party/dromaeo/tests/dom-modify-html.dart
index 7599b060bdc4d482e9ce05562343d5009181255d..e9cb8be707188c9cbc168c4696eeb83838b2b6be 100644
--- a/samples/third_party/dromaeo/tests/dom-modify-html.dart
+++ b/samples/third_party/dromaeo/tests/dom-modify-html.dart
@@ -1,7 +1,7 @@
library dromaeo;
import 'dart:async';
import 'dart:html';
-import 'dart:json' as json;
+import "dart:convert";
import 'dart:math' as Math;
part 'Common.dart';
part 'RunnerSuite.dart';
@@ -11,9 +11,10 @@ void main() {
var random = new Math.Random();
String str = 'null';
- // Very ugly way to build up the string, but let's mimic JS version as much as possible.
+ // Very ugly way to build up the string, but let's mimic JS version as much as
+ // possible.
for (int i = 0; i < 1024; i++) {
- str = "$str${new String.fromCharCodes([((25 * random.nextDouble()) + 97).toInt()])}";
+ str += new String.fromCharCode(((25 * random.nextDouble()) + 97).toInt());
Emily Fortuna 2013/08/28 21:09:54 Are these two forms identical, perf-wise? I'm not
floitsch 2013/08/28 21:12:15 The new one could be faster (although I'm not sure
Emily Fortuna 2013/08/28 21:19:01 Agreed StringBuffer is the fastest way for sure--
}
List<Node> elems = <Node>[];
« no previous file with comments | « samples/third_party/dromaeo/tests/dom-attr-html.dart ('k') | samples/third_party/dromaeo/tests/dom-query-html.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698