| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |