| OLD | NEW |
| (Empty) |
| 1 #import('../../../../../dart/client/testing/unittest/unittest.dart'); | |
| 2 #import('dart:dom'); | |
| 3 | |
| 4 // Test that SVG is present in dart:dom API | |
| 5 | |
| 6 main() { | |
| 7 forLayoutTests(); | |
| 8 | |
| 9 test('simpleRect', () { | |
| 10 var div = document.createElement('div'); | |
| 11 document.body.appendChild(div); | |
| 12 div.innerHTML = @''' | |
| 13 <svg id='svg1' width='200' height='100'> | |
| 14 <rect id='rect1' x='10' y='20' width='130' height='40' rx='5'fill='blue'></rect> | |
| 15 </svg> | |
| 16 '''; | |
| 17 | |
| 18 var e = document.getElementById('svg1'); | |
| 19 Expect.isTrue(e != null); | |
| 20 | |
| 21 SVGRectElement r = document.getElementById('rect1'); | |
| 22 Expect.equals(10, r.x.baseVal.value); | |
| 23 Expect.equals(20, r.y.baseVal.value); | |
| 24 Expect.equals(40, r.height.baseVal.value); | |
| 25 Expect.equals(130, r.width.baseVal.value); | |
| 26 Expect.equals(5, r.rx.baseVal.value); | |
| 27 }); | |
| 28 } | |
| OLD | NEW |