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