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

Unified Diff: tests/html/node_test.dart

Issue 12407005: Adding tests for Element & Node lists insert method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | « tests/html/element_test.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 0e0542c6f98fb6bc5fd83506d03de409950adf51..21808deda36006e0b7694c34b6c863d04e831b85 100644
--- a/tests/html/node_test.dart
+++ b/tests/html/node_test.dart
@@ -227,6 +227,18 @@ main() {
expect(a.nodes.length, nodesLength);
});
+ test('insert', () {
+ var node = new DivElement();
+ node.nodes.insert(0, new BRElement());
+ expect(node.nodes[0], isBRElement);
+ node.nodes.insert(0, new HRElement());
+ expect(node.nodes[0], isHRElement);
+ node.nodes.insert(1, new ImageElement());
+ expect(node.nodes[1], isImageElement);
+ node.nodes.insert(node.nodes.length, new InputElement());
+ expect(node.nodes.last, isInputElement);
+ });
+
test('clear', () {
var node = makeNodeWithChildren();
node.nodes.clear();
« no previous file with comments | « tests/html/element_test.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