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

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

Issue 613063002: Make Node.nodes.insertAll take an end-positioned index. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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 library NodeTest; 5 library NodeTest;
6 import 'package:unittest/unittest.dart'; 6 import 'package:unittest/unittest.dart';
7 import 'package:unittest/html_individual_config.dart'; 7 import 'package:unittest/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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 309
310 expect(node.nodes[0], isText); 310 expect(node.nodes[0], isText);
311 expect(node.nodes[1], isHRElement); 311 expect(node.nodes[1], isHRElement);
312 expect(node.nodes[2], isImageElement); 312 expect(node.nodes[2], isImageElement);
313 expect(node.nodes[3], isInputElement); 313 expect(node.nodes[3], isInputElement);
314 expect(node.nodes[4], isBRElement); 314 expect(node.nodes[4], isBRElement);
315 expect(node.nodes[5], isHRElement); 315 expect(node.nodes[5], isHRElement);
316 expect(node.nodes[6], isImageElement); 316 expect(node.nodes[6], isImageElement);
317 expect(node.nodes[7], isInputElement); 317 expect(node.nodes[7], isInputElement);
318 expect(node.nodes[8], isComment); 318 expect(node.nodes[8], isComment);
319
320 var d = new DivElement();
321 var ns = d.nodes;
322 // `insertAll` should work when positioned at end.
323 ns.insertAll(ns.length, [new HRElement()]);
324 expect(ns.length, 1);
325 expect(ns[0], isHRElement);
319 }); 326 });
320 327
321 testUnsupported('removeRange', () { 328 testUnsupported('removeRange', () {
322 makeNodeWithChildren().nodes.removeRange(0, 1); 329 makeNodeWithChildren().nodes.removeRange(0, 1);
323 }); 330 });
324 331
325 testUnsupported('replaceRange', () { 332 testUnsupported('replaceRange', () {
326 makeNodeWithChildren().nodes.replaceRange(0, 1, [new InputElement()]); 333 makeNodeWithChildren().nodes.replaceRange(0, 1, [new InputElement()]);
327 }); 334 });
328 335
(...skipping 15 matching lines...) Expand all
344 }); 351 });
345 352
346 test('TreeWalker', () { 353 test('TreeWalker', () {
347 var root = makeNodeWithChildren(); 354 var root = makeNodeWithChildren();
348 var treeWalker = new TreeWalker(root, NodeFilter.SHOW_COMMENT); 355 var treeWalker = new TreeWalker(root, NodeFilter.SHOW_COMMENT);
349 expect(treeWalker.nextNode(), isComment); 356 expect(treeWalker.nextNode(), isComment);
350 expect(treeWalker.nextNode(), isNull); 357 expect(treeWalker.nextNode(), isNull);
351 }); 358 });
352 }); 359 });
353 } 360 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/templates/html/impl/impl_Node.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698