OLD | NEW |
(Empty) | |
| 1 <parent> |
| 2 <child1> |
| 3 <grandchild /> |
| 4 </child1> |
| 5 <child2 /> |
| 6 </parent> |
| 7 |
| 8 <script> |
| 9 import "../resources/third_party/unittest/unittest.dart"; |
| 10 import "../resources/unit.dart"; |
| 11 |
| 12 import "dart:sky"; |
| 13 |
| 14 void main() { |
| 15 initUnit(); |
| 16 |
| 17 test("getChildElements should only include immediate children", () { |
| 18 var parent = document.querySelector('parent'); |
| 19 var children = parent.getChildElements(); |
| 20 expect(children.length, equals(2)); |
| 21 expect(children[0], equals(document.querySelector('child1'))); |
| 22 expect(children[1], equals(document.querySelector('child2'))); |
| 23 }); |
| 24 } |
| 25 </script> |
| 26 </sky> |
OLD | NEW |