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

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

Issue 13685021: Properly exposing NodeIterator and TreeWalker. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
« no previous file with comments | « sdk/lib/svg/dartium/svg_dartium.dart ('k') | tools/dom/scripts/htmlrenamer.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 library NodeTest; 5 library NodeTest;
6 import '../../pkg/unittest/lib/unittest.dart'; 6 import '../../pkg/unittest/lib/unittest.dart';
7 import '../../pkg/unittest/lib/html_individual_config.dart'; 7 import '../../pkg/unittest/lib/html_individual_config.dart';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'dart:svg' as svg; 9 import 'dart:svg' as svg;
10 10
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 expect(filtered, isNodeList); 340 expect(filtered, isNodeList);
341 }); 341 });
342 342
343 test('sublist', () { 343 test('sublist', () {
344 var range = makeNodeList().sublist(1, 3); 344 var range = makeNodeList().sublist(1, 3);
345 expect(range, isNodeList); 345 expect(range, isNodeList);
346 expect(range[0], isBRElement); 346 expect(range[0], isBRElement);
347 expect(range[1], isComment); 347 expect(range[1], isComment);
348 }); 348 });
349 }); 349 });
350
351 group('iterating', () {
352 test('NodeIterator', () {
353 var root = makeNodeWithChildren();
354 var nodeIterator = new NodeIterator(root, NodeFilter.SHOW_COMMENT);
355 expect(nodeIterator.nextNode(), isComment);
356 expect(nodeIterator.nextNode(), isNull);
357 });
358
359 test('TreeWalker', () {
360 var root = makeNodeWithChildren();
361 var treeWalker = new TreeWalker(root, NodeFilter.SHOW_COMMENT);
362 expect(treeWalker.nextNode(), isComment);
363 expect(treeWalker.nextNode(), isNull);
364 });
365 });
350 } 366 }
OLDNEW
« no previous file with comments | « sdk/lib/svg/dartium/svg_dartium.dart ('k') | tools/dom/scripts/htmlrenamer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698