| Index: sky/tests/resources/dom-utils.sky
|
| diff --git a/sky/tests/resources/dom-utils.sky b/sky/tests/resources/dom-utils.sky
|
| index 40668f6c6d40eb66fed2dad1820271100249f557..98c03fbe5e2ce4783ce42e01d0d323756bdc600f 100644
|
| --- a/sky/tests/resources/dom-utils.sky
|
| +++ b/sky/tests/resources/dom-utils.sky
|
| @@ -1,20 +1,17 @@
|
| <script>
|
| - function childNodeCount(parent) {
|
| - var count = 0;
|
| - for (var node = parent.firstChild; node; node = node.nextSibling)
|
| - ++count;
|
| - return count;
|
| - }
|
| +import "dart:sky";
|
|
|
| - function childElementCount(parent) {
|
| - var count = 0;
|
| - for (var element = parent.firstElementChild; element; element = element.nextElementSibling)
|
| - ++count;
|
| - return count;
|
| - }
|
| +int childNodeCount(parent) {
|
| + int count = 0;
|
| + for (Node node = parent.firstChild; node != null; node = node.nextSibling)
|
| + ++count;
|
| + return count;
|
| +}
|
|
|
| - module.exports = {
|
| - childNodeCount: childNodeCount,
|
| - childElementCount: childElementCount,
|
| - };
|
| -</script>
|
| +int childElementCount(parent) {
|
| + int count = 0;
|
| + for (Element element = parent.firstElementChild; element != null; element = element.nextElementSibling)
|
| + ++count;
|
| + return count;
|
| +}
|
| +</script>
|
|
|