OLD | NEW |
| (Empty) |
1 library dromaeo; | |
2 import 'dart:async'; | |
3 import 'dart:html'; | |
4 import "dart:convert"; | |
5 import 'dart:math' as Math; | |
6 part 'Common.dart'; | |
7 part 'RunnerSuite.dart'; | |
8 | |
9 void main() { | |
10 final int num = 10240; | |
11 | |
12 // Try to force real results. | |
13 var ret; | |
14 | |
15 Element elem = document.querySelector('#test1'); | |
16 Element a = document.querySelector('a'); | |
17 | |
18 new Suite(window, 'dom-attr') | |
19 .test('getAttribute', () { | |
20 for (int i = 0; i < num; i++) | |
21 ret = elem.getAttribute('id'); | |
22 }) | |
23 .test('element.property', () { | |
24 for (int i = 0; i < num * 2; i++) | |
25 ret = elem.id; | |
26 }) | |
27 .test('setAttribute', () { | |
28 for (int i = 0; i < num; i++) | |
29 a.setAttribute('id', 'foo'); | |
30 }) | |
31 .test('element.property = value', () { | |
32 for (int i = 0; i < num; i++) | |
33 a.id = 'foo'; | |
34 }) | |
35 .end(); | |
36 } | |
OLD | NEW |