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

Unified Diff: tests/html/node_test.dart

Issue 12271004: Fixing node.nodes.addAll to accept node lists. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/templates/html/impl/impl_Element.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/node_test.dart
diff --git a/tests/html/node_test.dart b/tests/html/node_test.dart
index d9cfe24a66153569dc987a6f8d407af2f2a714d1..fe31ed764c2de4f5f86faa36043596662a55dfd0 100644
--- a/tests/html/node_test.dart
+++ b/tests/html/node_test.dart
@@ -159,6 +159,23 @@ main() {
expect(node.nodes[3], isHRElement);
expect(node.nodes[4], isImageElement);
expect(node.nodes[5], isInputElement);
+
+ var a = makeNodeWithChildren();
+ var b = makeNodeWithChildren();
+ var childrenLength = a.children.length + b.children.length;
+ var nodesLength = a.nodes.length + b.nodes.length;
+
+ a.children.addAll(b.children);
+ expect(b.children.length, 0);
+ expect(a.children.length, childrenLength);
+
+ b.nodes.addAll(a.children);
+ expect(a.children.length, 0);
+ expect(b.children.length, childrenLength);
+
+ a.nodes.addAll(b.nodes);
+ expect(b.nodes.length, 0);
+ expect(a.nodes.length, nodesLength);
});
test('clear', () {
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/templates/html/impl/impl_Element.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698