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

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

Issue 11644061: Fixing a bunch of dartc errors in dart:html tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 12 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 ElementTest; 5 library ElementTest;
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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 expect(attributes.length, 4); 473 expect(attributes.length, 4);
474 attributes['style'] = 'width: 300px;'; 474 attributes['style'] = 'width: 300px;';
475 expect(attributes.length, 5); 475 expect(attributes.length, 5);
476 }); 476 });
477 477
478 test('namespaces', () { 478 test('namespaces', () {
479 var element = new svg.SvgElement.svg( 479 var element = new svg.SvgElement.svg(
480 '''<svg xmlns="http://www.w3.org/2000/svg" 480 '''<svg xmlns="http://www.w3.org/2000/svg"
481 xmlns:xlink="http://www.w3.org/1999/xlink"> 481 xmlns:xlink="http://www.w3.org/1999/xlink">
482 <image xlink:href="foo" data-foo="bar"/> 482 <image xlink:href="foo" data-foo="bar"/>
483 </svg>''').elements[0]; 483 </svg>''').children[0];
484 484
485 var attributes = element.attributes; 485 var attributes = element.attributes;
486 expect(attributes.length, 1); 486 expect(attributes.length, 1);
487 expect(attributes['data-foo'], 'bar'); 487 expect(attributes['data-foo'], 'bar');
488 488
489 var xlinkAttrs = 489 var xlinkAttrs =
490 element.getNamespacedAttributes('http://www.w3.org/1999/xlink'); 490 element.getNamespacedAttributes('http://www.w3.org/1999/xlink');
491 expect(xlinkAttrs.length, 1); 491 expect(xlinkAttrs.length, 1);
492 expect(xlinkAttrs['href'], 'foo'); 492 expect(xlinkAttrs['href'], 'foo');
493 493
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 }); 773 });
774 774
775 test('getRange', () { 775 test('getRange', () {
776 var range = makeElList().getRange(1, 2); 776 var range = makeElList().getRange(1, 2);
777 expect(range, isElementList); 777 expect(range, isElementList);
778 expect(range[0], isImageElement); 778 expect(range[0], isImageElement);
779 expect(range[1], isInputElement); 779 expect(range[1], isInputElement);
780 }); 780 });
781 }); 781 });
782 } 782 }
OLDNEW
« no previous file with comments | « tests/html/element_add_test.dart ('k') | tests/html/html.status » ('j') | tests/html/html.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698