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

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

Issue 12596004: Replaced Element.append with Node.appendChild (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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:async'; 2 import 'dart:async';
3 import 'dart:html'; 3 import 'dart:html';
4 import 'dart:json' as json; 4 import 'dart:json' as json;
5 import '../common/common.dart'; 5 import '../common/common.dart';
6 import 'dart:math' as Math; 6 import 'dart:math' as Math;
7 import 'dart:json' as json; 7 import 'dart:json' as json;
8 part 'Common.dart'; 8 part 'Common.dart';
9 part 'RunnerSuite.dart'; 9 part 'RunnerSuite.dart';
10 10
(...skipping 14 matching lines...) Expand all
25 }); 25 });
26 html = BenchUtil.replaceAll(html, 'name="test.*?"', (Match match) { 26 html = BenchUtil.replaceAll(html, 'name="test.*?"', (Match match) {
27 return 'name="test${num}"'; 27 return 'name="test${num}"';
28 }); 28 });
29 html = BenchUtil.replaceAll(html, 'class="foo.*?"', (Match match) { 29 html = BenchUtil.replaceAll(html, 'class="foo.*?"', (Match match) {
30 return 'class="foo test${num} bar"'; 30 return 'class="foo test${num} bar"';
31 }); 31 });
32 32
33 final div = new Element.tag('div'); 33 final div = new Element.tag('div');
34 div.innerHtml = html; 34 div.innerHtml = html;
35 document.body.$dom_appendChild(div); 35 document.body.append(div);
36 }) 36 })
37 .test('firstChild', () { 37 .test('firstChild', () {
38 final nodes = document.body.$dom_childNodes; 38 final nodes = document.body.$dom_childNodes;
39 final nl = nodes.length; 39 final nl = nodes.length;
40 40
41 for (int i = 0; i < num; i++) { 41 for (int i = 0; i < num; i++) {
42 for (int j = 0; j < nl; j++) { 42 for (int j = 0; j < nl; j++) {
43 Node cur = nodes[j]; 43 Node cur = nodes[j];
44 while (cur != null) { 44 while (cur != null) {
45 cur = cur.$dom_firstChild; 45 cur = cur.$dom_firstChild;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 .test('childNodes', () { 83 .test('childNodes', () {
84 for (int i = 0; i < num; i++) { 84 for (int i = 0; i < num; i++) {
85 final nodes = document.body.$dom_childNodes; 85 final nodes = document.body.$dom_childNodes;
86 for (int j = 0; j < nodes.length; j++) { 86 for (int j = 0; j < nodes.length; j++) {
87 ret = nodes[j]; 87 ret = nodes[j];
88 } 88 }
89 } 89 }
90 }) 90 })
91 .end(); 91 .end();
92 } 92 }
OLDNEW
« no previous file with comments | « samples/third_party/dromaeo/tests/dom-query-html.dart ('k') | sdk/lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698