| 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 SvgElementTest; | 5 library SvgElementTest; |
| 6 | 6 |
| 7 import 'dart:html'; | 7 import 'dart:html'; |
| 8 import 'dart:svg' as svg; | 8 import 'dart:svg' as svg; |
| 9 import 'package:expect/expect.dart'; | 9 import 'package:expect/expect.dart'; |
| 10 import 'package:unittest/html_individual_config.dart'; | 10 import 'package:unittest/html_individual_config.dart'; |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 root.append(element); | 473 root.append(element); |
| 474 | 474 |
| 475 document.body.append(root); | 475 document.body.append(root); |
| 476 | 476 |
| 477 var rect = element.getBoundingClientRect(); | 477 var rect = element.getBoundingClientRect(); |
| 478 expect(rect is Rectangle, isTrue); | 478 expect(rect is Rectangle, isTrue); |
| 479 expect(rect.width, closeTo(100, 1)); | 479 expect(rect.width, closeTo(100, 1)); |
| 480 expect(rect.height, closeTo(100, 1)); | 480 expect(rect.height, closeTo(100, 1)); |
| 481 }); | 481 }); |
| 482 }); | 482 }); |
| 483 | |
| 484 group('PathElement', () { | |
| 485 test('pathSegList', () { | |
| 486 svg.PathElement path = | |
| 487 new svg.SvgElement.svg('<path d="M 100 100 L 300 100 L 200 300 z"/>'); | |
| 488 for (var seg in path.pathSegList) { | |
| 489 expect(seg is svg.PathSeg, isTrue); | |
| 490 } | |
| 491 }); | |
| 492 }); | |
| 493 } | 483 } |
| OLD | NEW |