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

Unified Diff: tests/html/xmldocument_test.dart

Issue 11413071: Deprecating Element.elements for Element.children. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Review feedback. Created 8 years, 1 month 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/svgelement_test.dart ('k') | tests/html/xmlelement_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/xmldocument_test.dart
diff --git a/tests/html/xmldocument_test.dart b/tests/html/xmldocument_test.dart
index 5667812bd8309604d122bd3a8e223126bf0b66aa..53c3bc41f1c1706ac7df63bd93ee981187760c74 100644
--- a/tests/html/xmldocument_test.dart
+++ b/tests/html/xmldocument_test.dart
@@ -19,8 +19,8 @@ main() {
test('with a well-formed document', () {
final doc = makeDocument();
expect(doc, isXMLDocument);
- expect(doc.elements[0].tagName, 'foo');
- expect(doc.elements[1].tagName, 'bar');
+ expect(doc.children[0].tagName, 'foo');
+ expect(doc.children[1].tagName, 'bar');
});
// TODO(nweiz): re-enable this when Document#query matches the root-level
@@ -33,20 +33,20 @@ main() {
test('with a PARSERERROR tag', () {
final doc = new XMLDocument.xml("<xml><parsererror /></xml>");
- expect(doc.elements[0].tagName, 'parsererror');
+ expect(doc.children[0].tagName, 'parsererror');
});
});
// FilteredElementList is tested more thoroughly in DocumentFragmentTests.
- group('elements', () {
+ group('children', () {
test('filters out non-element nodes', () {
final doc = new XMLDocument.xml("<xml>1<a/><b/>2<c/>3<d/></xml>");
- expect(doc.elements.map((e) => e.tagName), ["a", "b", "c", "d"]);
+ expect(doc.children.map((e) => e.tagName), ["a", "b", "c", "d"]);
});
test('overwrites nodes when set', () {
final doc = new XMLDocument.xml("<xml>1<a/><b/>2<c/>3<d/></xml>");
- doc.elements = [new XMLElement.tag('x'), new XMLElement.tag('y')];
+ doc.children = [new XMLElement.tag('x'), new XMLElement.tag('y')];
expect(doc.outerHTML, "<xml><x></x><y></y></xml>");
});
});
« no previous file with comments | « tests/html/svgelement_test.dart ('k') | tests/html/xmlelement_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698