| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |