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

Unified Diff: tests/html/element_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 | « sdk/lib/html/dartium/html_dartium.dart ('k') | tests/html/node_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/element_test.dart
diff --git a/tests/html/element_test.dart b/tests/html/element_test.dart
index 35b5b2ec24d33796b017ae6fd2264457fcd394e6..644afcdec185cf57e75a2f63e5dd22e9e4ad392c 100644
--- a/tests/html/element_test.dart
+++ b/tests/html/element_test.dart
@@ -465,6 +465,18 @@ main() {
expect(el.children[5], isHeadingElement);
});
+ test('insert', () {
+ var element = new DivElement();
+ element.children.insert(0, new BRElement());
+ expect(element.children[0], isBRElement);
+ element.children.insert(0, new HRElement());
+ expect(element.children[0], isHRElement);
+ element.children.insert(1, new ImageElement());
+ expect(element.children[1], isImageElement);
+ element.children.insert(element.children.length, new InputElement());
+ expect(element.children.last, isInputElement);
+ });
+
test('clear', () {
var el = makeElementWithChildren();
el.children.clear();
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tests/html/node_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698