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

Side by Side Diff: client/dom/benchmarks/dromaeo/tests/dom-modify.dart

Issue 8330003: Rename cloneNode to clone and move it into the Node interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | client/html/benchmarks/dromaeo/tests/DomModify.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #library("dom-modify.dart"); 1 #library("dom-modify.dart");
2 #import("dart:dom"); 2 #import("dart:dom");
3 #import('runner.dart'); 3 #import('runner.dart');
4 4
5 void main() { 5 void main() {
6 final int num = 400; 6 final int num = 400;
7 7
8 String str = 'null'; 8 String str = 'null';
9 // Very ugly way to build up the string, but let's mimic JS version as much as possible. 9 // Very ugly way to build up the string, but let's mimic JS version as much as possible.
10 for (int i = 0; i < 1024; i++) { 10 for (int i = 0; i < 1024; i++) {
(...skipping 29 matching lines...) Expand all
40 .test('innerHTML', () { 40 .test('innerHTML', () {
41 document.body.innerHTML = htmlstr; 41 document.body.innerHTML = htmlstr;
42 }) 42 })
43 .prep(() { 43 .prep(() {
44 elems = new List<Node>(); 44 elems = new List<Node>();
45 final telems = document.body.childNodes; 45 final telems = document.body.childNodes;
46 for (int i = 0; i < telems.length; i++) { 46 for (int i = 0; i < telems.length; i++) {
47 elems.add(telems[i]); 47 elems.add(telems[i]);
48 } 48 }
49 }) 49 })
50 .test('cloneNode', () { 50 .test('clone', () {
51 for (int i = 0; i < elems.length; i++) { 51 for (int i = 0; i < elems.length; i++) {
Jacob 2011/10/18 01:36:48 Don't modify this file. It uses the dart:dom libra
nweiz 2011/10/18 19:49:41 Done.
52 ret = elems[i].cloneNode(false); 52 ret = elems[i].clone(false);
53 ret = elems[i].cloneNode(true); 53 ret = elems[i].clone(true);
54 ret = elems[i].cloneNode(true); 54 ret = elems[i].clone(true);
55 } 55 }
56 }) 56 })
57 .test('appendChild', () { 57 .test('appendChild', () {
58 for (int i = 0; i < elems.length; i++) 58 for (int i = 0; i < elems.length; i++)
59 document.body.appendChild(elems[i]); 59 document.body.appendChild(elems[i]);
60 }) 60 })
61 .test('insertBefore', () { 61 .test('insertBefore', () {
62 for (int i = 0; i < elems.length; i++) 62 for (int i = 0; i < elems.length; i++)
63 document.body.insertBefore(elems[i], document.body.firstChild); 63 document.body.insertBefore(elems[i], document.body.firstChild);
64 }) 64 })
65 .end(); 65 .end();
66 }; 66 };
67 } 67 }
OLDNEW
« no previous file with comments | « no previous file | client/html/benchmarks/dromaeo/tests/DomModify.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698