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

Side by Side Diff: samples/third_party/dromaeo/tests/dom-modify-htmlidiomatic.dart

Issue 11364134: Merge libv1. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Reupload due to error Created 8 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 #library("dom_modify_html"); 1 library dom_modify_html;
2 #import("dart:html"); 2 import 'dart:html';
3 #import("dart:json"); 3 import 'dart:json';
4 #import("dart:math", prefix: "Math"); 4 import 'dart:math' as Math;
5 #source("Common.dart"); 5 part 'Common.dart';
6 #source("RunnerSuite.dart"); 6 part 'RunnerSuite.dart';
7 7
8 void main() { 8 void main() {
9 final int num = 400; 9 final int num = 400;
10 10
11 String str = 'null'; 11 String str = 'null';
12 // Very ugly way to build up the string, but let's mimic JS version as much as possible. 12 // Very ugly way to build up the string, but let's mimic JS version as much as possible.
13 for (int i = 0; i < 1024; i++) { 13 for (int i = 0; i < 1024; i++) {
14 str = "$str${new String.fromCharCodes([((25 * Math.random()) + 97).toInt()]) }"; 14 str = "$str${new String.fromCharCodes([((25 * Math.random()) + 97).toInt()]) }";
15 } 15 }
16 16
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 .test('appendChild', () { 60 .test('appendChild', () {
61 for (int i = 0; i < elems.length; i++) 61 for (int i = 0; i < elems.length; i++)
62 document.body.nodes.add(elems[i]); 62 document.body.nodes.add(elems[i]);
63 }) 63 })
64 .test('insertBefore', () { 64 .test('insertBefore', () {
65 for (int i = 0; i < elems.length; i++) 65 for (int i = 0; i < elems.length; i++)
66 document.body.insertBefore(elems[i], document.body.nodes.first); 66 document.body.insertBefore(elems[i], document.body.nodes.first);
67 }) 67 })
68 .end(); 68 .end();
69 } 69 }
OLDNEW
« no previous file with comments | « samples/third_party/dromaeo/tests/dom-modify-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