OLD | NEW |
| (Empty) |
1 #import('../../../../../dart/client/testing/unittest/unittest.dart'); | |
2 #import('dart:dom'); | |
3 | |
4 main() { | |
5 forLayoutTests(); | |
6 test('NodeList', () { | |
7 List<Node> asList = window.document.getElementsByTagName('body'); | |
8 // Check it's Iterable | |
9 int counter = 0; | |
10 for (Node node in window.document.getElementsByTagName('body')) { | |
11 counter++; | |
12 } | |
13 Expect.equals(1, counter); | |
14 counter = 0; | |
15 window.document.getElementsByTagName('body').forEach((e) { counter++; }); | |
16 Expect.equals(1, counter); | |
17 }); | |
18 test('StyleSheetList', () { | |
19 List<StyleSheet> asList = window.document.styleSheets; | |
20 // Check it's Iterable. | |
21 int counter = 0; | |
22 for (StyleSheet styleSheet in window.document.styleSheets) { | |
23 counter++; | |
24 } | |
25 Expect.equals(0, counter); | |
26 }); | |
27 } | |
OLD | NEW |