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

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

Issue 11748016: Make ~/, round, ceil, floor, truncate return ints. Remove toInt. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Checked mode fixes. Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 library dromaeo; 1 library dromaeo;
2 import 'dart:html'; 2 import 'dart:html';
3 import 'dart:json' as json; 3 import 'dart:json' as json;
4 import 'dart:math' as Math; 4 import 'dart:math' as Math;
5 part 'Common.dart'; 5 part 'Common.dart';
6 part '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 var random = new Math.Random(); 10 var random = new Math.Random();
11 11
12 String str = 'null'; 12 String str = 'null';
13 // Very ugly way to build up the string, but let's mimic JS version as much as possible. 13 // Very ugly way to build up the string, but let's mimic JS version as much as possible.
14 for (int i = 0; i < 1024; i++) { 14 for (int i = 0; i < 1024; i++) {
15 str = "$str${new String.fromCharCodes([((25 * random.nextDouble()) + 97).toI nt()])}"; 15 str = "$str${new String.fromCharCodes([((25 * random.nextDouble()) + 97).tru ncate()])}";
Lasse Reichstein Nielsen 2013/01/04 10:29:42 Line length. You can insert line-breaks inside int
16 } 16 }
17 17
18 List<Node> elems = <Node>[]; 18 List<Node> elems = <Node>[];
19 19
20 // Try to force real results. 20 // Try to force real results.
21 var ret; 21 var ret;
22 22
23 final htmlstr = document.body.innerHtml; 23 final htmlstr = document.body.innerHtml;
24 24
25 new Suite(window, 'dom-modify') 25 new Suite(window, 'dom-modify')
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 .test('appendChild', () { 61 .test('appendChild', () {
62 for (int i = 0; i < elems.length; i++) 62 for (int i = 0; i < elems.length; i++)
63 document.body.$dom_appendChild(elems[i]); 63 document.body.$dom_appendChild(elems[i]);
64 }) 64 })
65 .test('insertBefore', () { 65 .test('insertBefore', () {
66 for (int i = 0; i < elems.length; i++) 66 for (int i = 0; i < elems.length; i++)
67 document.body.insertBefore(elems[i], document.body.$dom_firstChild); 67 document.body.insertBefore(elems[i], document.body.$dom_firstChild);
68 }) 68 })
69 .end(); 69 .end();
70 } 70 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698