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

Unified Diff: sky/tests/dom/getChildElements.dart

Issue 1212163009: Port remaining Sky tests to the new world (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: add Created 5 years, 6 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/dom/document_child_mutations-expected.txt ('k') | sky/tests/dom/getChildElements.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tests/dom/getChildElements.dart
diff --git a/sky/tests/dom/getChildElements.dart b/sky/tests/dom/getChildElements.dart
new file mode 100644
index 0000000000000000000000000000000000000000..c5ce427799fa8ceaec27fbf21fe867bb705f1b2e
--- /dev/null
+++ b/sky/tests/dom/getChildElements.dart
@@ -0,0 +1,26 @@
+import "../resources/third_party/unittest/unittest.dart";
+import "../resources/unit.dart";
+
+import "dart:sky";
+
+void main() {
+ initUnit();
+
+ test("getChildElements should only include immediate children", () {
+ var doc = new Document();
+ var parent = doc.createElement('parent');
+ var child1 = doc.createElement('child1');
+ var child2 = doc.createElement('child1');
+ var grandchild = doc.createElement('grandchild');
+
+ doc.appendChild(parent);
+ parent.appendChild(child1);
+ parent.appendChild(child2);
+ child1.appendChild(grandchild);
+
+ var children = parent.getChildElements();
+ expect(children.length, equals(2));
+ expect(children[0], equals(child1));
+ expect(children[1], equals(child2));
+ });
+}
« no previous file with comments | « sky/tests/dom/document_child_mutations-expected.txt ('k') | sky/tests/dom/getChildElements.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698