OLD | NEW |
1 #library('TypingTest'); | 1 #library('TypingTest'); |
2 #import('../../../testing/unittest/unittest.dart'); | 2 #import('../../../testing/unittest/unittest_dom.dart'); |
3 #import('dart:dom'); | 3 #import('dart:dom'); |
4 | 4 |
5 main() { | 5 main() { |
6 forLayoutTests(); | 6 forLayoutTests(); |
7 | 7 |
8 test('NodeList', () { | 8 test('NodeList', () { |
9 List<Node> asList = window.document.getElementsByTagName('body'); | 9 List<Node> asList = window.document.getElementsByTagName('body'); |
10 // Check it's Iterable | 10 // Check it's Iterable |
11 int counter = 0; | 11 int counter = 0; |
12 for (Node node in window.document.getElementsByTagName('body')) { | 12 for (Node node in window.document.getElementsByTagName('body')) { |
(...skipping 10 matching lines...) Expand all Loading... |
23 // Check it's Iterable. | 23 // Check it's Iterable. |
24 int counter = 0; | 24 int counter = 0; |
25 for (StyleSheet styleSheet in window.document.styleSheets) { | 25 for (StyleSheet styleSheet in window.document.styleSheets) { |
26 counter++; | 26 counter++; |
27 } | 27 } |
28 | 28 |
29 // There is one style sheet from the unittest framework. | 29 // There is one style sheet from the unittest framework. |
30 Expect.equals(1, counter); | 30 Expect.equals(1, counter); |
31 }); | 31 }); |
32 } | 32 } |
OLD | NEW |