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

Side by Side Diff: tests/html/document_fragment_tests.dart

Issue 10191033: test renaming overhaul: step 4 client tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 testDocumentFragment() { 5 testDocumentFragment() {
6 Collection<String> _nodeStrings(Collection<Node> input) { 6 Collection<String> _nodeStrings(Collection<Node> input) {
7 var out = new List<String>(); 7 var out = new List<String>();
8 for (Node n in input) { 8 for (Node n in input) {
9 if (n is Element) { 9 if (n is Element) {
10 Element e = n; 10 Element e = n;
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 // // assertConstError(() => fragment.classes.add('foo')); 338 // // assertConstError(() => fragment.classes.add('foo'));
339 // }); 339 // });
340 340
341 test('query searches the fragment', () { 341 test('query searches the fragment', () {
342 var fragment = new DocumentFragment.html( 342 var fragment = new DocumentFragment.html(
343 "<div class='foo'><a>foo</a><b>bar</b></div>"); 343 "<div class='foo'><a>foo</a><b>bar</b></div>");
344 Expect.equals("A", fragment.query(".foo a").tagName); 344 Expect.equals("A", fragment.query(".foo a").tagName);
345 Expect.listEquals(["A", "B"], _nodeStrings(fragment.queryAll(".foo *"))); 345 Expect.listEquals(["A", "B"], _nodeStrings(fragment.queryAll(".foo *")));
346 }); 346 });
347 } 347 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698