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