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

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

Issue 732203004: Clean up child checks in ContainerNode. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Add back secondary hierarchy checks. Created 6 years, 1 month 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/dom/replaceChild-expected.txt ('k') | no next file » | 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
new file mode 100644
index 0000000000000000000000000000000000000000..40668f6c6d40eb66fed2dad1820271100249f557
--- /dev/null
+++ b/sky/tests/resources/dom-utils.sky
@@ -0,0 +1,20 @@
+<script>
+ function childNodeCount(parent) {
+ var count = 0;
+ for (var node = parent.firstChild; node; node = node.nextSibling)
+ ++count;
+ return count;
+ }
+
+ function childElementCount(parent) {
+ var count = 0;
+ for (var element = parent.firstElementChild; element; element = element.nextElementSibling)
+ ++count;
+ return count;
+ }
+
+ module.exports = {
+ childNodeCount: childNodeCount,
+ childElementCount: childElementCount,
+ };
+</script>
« no previous file with comments | « sky/tests/dom/replaceChild-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698