Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(713)

Unified Diff: sky/tests/resources/dom-utils.sky

Issue 922893002: Merge the Sky Engine changes from the SkyDart branch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/tests/modules/resources/syntax-error.sky ('k') | sky/tests/resources/dump-as-markup.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « sky/tests/modules/resources/syntax-error.sky ('k') | sky/tests/resources/dump-as-markup.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698