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

Side by Side Diff: samples/third_party/dromaeo/tests/dom-query-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 '../common/common.dart'; 4 import '../common/common.dart';
5 import 'dart:json' as json; 5 import 'dart:json' as json;
6 import 'dart:math' as Math; 6 import 'dart:math' as Math;
7 part 'Common.dart'; 7 part 'Common.dart';
8 part 'RunnerSuite.dart'; 8 part 'RunnerSuite.dart';
9 9
10 void main() { 10 void main() {
(...skipping 11 matching lines...) Expand all
22 return 'id="test${group}${num}"'; 22 return 'id="test${group}${num}"';
23 }); 23 });
24 html = BenchUtil.replaceAll(html, 'name="test.*?"', (Match match) { 24 html = BenchUtil.replaceAll(html, 'name="test.*?"', (Match match) {
25 return 'name="test${num}"'; 25 return 'name="test${num}"';
26 }); 26 });
27 html = BenchUtil.replaceAll(html, 'class="foo.*?"', (Match match) { 27 html = BenchUtil.replaceAll(html, 'class="foo.*?"', (Match match) {
28 return 'class="foo test${num} bar"'; 28 return 'class="foo test${num} bar"';
29 }); 29 });
30 final div = new Element.tag('div'); 30 final div = new Element.tag('div');
31 div.innerHtml = html; 31 div.innerHtml = html;
32 document.body.$dom_appendChild(div); 32 document.body.append(div);
33 }) 33 })
34 .test('getElementById', () { 34 .test('getElementById', () {
35 for (int i = 0; i < num * 30; i++) { 35 for (int i = 0; i < num * 30; i++) {
36 ret = document.$dom_getElementById('testA$num').nodeType; 36 ret = document.$dom_getElementById('testA$num').nodeType;
37 ret = document.$dom_getElementById('testB$num').nodeType; 37 ret = document.$dom_getElementById('testB$num').nodeType;
38 ret = document.$dom_getElementById('testC$num').nodeType; 38 ret = document.$dom_getElementById('testC$num').nodeType;
39 ret = document.$dom_getElementById('testD$num').nodeType; 39 ret = document.$dom_getElementById('testD$num').nodeType;
40 ret = document.$dom_getElementById('testE$num').nodeType; 40 ret = document.$dom_getElementById('testE$num').nodeType;
41 ret = document.$dom_getElementById('testF$num').nodeType; 41 ret = document.$dom_getElementById('testF$num').nodeType;
42 } 42 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 for (int i = 0; i < num * 20; i++) { 97 for (int i = 0; i < num * 20; i++) {
98 ret = document.$dom_getElementsByName('test').length == 0; 98 ret = document.$dom_getElementsByName('test').length == 0;
99 ret = document.$dom_getElementsByName('test').length == 0; 99 ret = document.$dom_getElementsByName('test').length == 0;
100 ret = document.$dom_getElementsByName('test').length == 0; 100 ret = document.$dom_getElementsByName('test').length == 0;
101 ret = document.$dom_getElementsByName('test').length == 0; 101 ret = document.$dom_getElementsByName('test').length == 0;
102 ret = document.$dom_getElementsByName('test').length == 0; 102 ret = document.$dom_getElementsByName('test').length == 0;
103 } 103 }
104 }) 104 })
105 .end(); 105 .end();
106 } 106 }
OLDNEW
« no previous file with comments | « samples/third_party/dromaeo/tests/dom-modify-html.dart ('k') | samples/third_party/dromaeo/tests/dom-traverse-html.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698