Index: tests/html/element_add_test.dart |
=================================================================== |
--- tests/html/element_add_test.dart (revision 39571) |
+++ tests/html/element_add_test.dart (working copy) |
@@ -74,6 +74,18 @@ |
expect(el.nodes.length, equals(1)); |
}); |
+ test('htmlelement', () { |
+ var el = new DivElement(); |
+ var twoNewLines = "\n\n"; |
+ el.appendText(twoNewLines); |
+ // No children were created. |
+ expect(el.children.length, equals(0)); |
+ // One text node was added. |
+ expect(el.nodes.length, equals(1)); |
+ expect(el.nodes[0], isText); |
+ expect(el.nodes[0].text, equals(twoNewLines)); |
ahe
2014/08/27 11:48:48
Suggest adding:
expect(el.text, equals(twoNewLine
|
+ }); |
+ |
test('documentFragment', () { |
var fragment = new DocumentFragment(); |
fragment.appendText('foo'); |