| OLD | NEW |
| 1 library SVG2Test; | 1 library SVG2Test; |
| 2 import '../../pkg/unittest/lib/unittest.dart'; | 2 import '../../pkg/unittest/lib/unittest.dart'; |
| 3 import '../../pkg/unittest/lib/html_config.dart'; | 3 import '../../pkg/unittest/lib/html_config.dart'; |
| 4 import 'dart:html'; | 4 import 'dart:html'; |
| 5 import 'dart:svg' as svg; | 5 import 'dart:svg' as svg; |
| 6 | 6 |
| 7 // Test that SVG elements explicitly implement the IDL interfaces (is-checks | 7 // Test that SVG elements explicitly implement the IDL interfaces (is-checks |
| 8 // only, see SVGTest3 for behavioural tests). | 8 // only, see SVGTest3 for behavioural tests). |
| 9 | 9 |
| 10 main() { | 10 main() { |
| 11 | 11 |
| 12 insertTestDiv() { | 12 insertTestDiv() { |
| 13 var element = new Element.tag('div'); | 13 var element = new Element.tag('div'); |
| 14 element.innerHTML = r''' | 14 element.innerHtml = r''' |
| 15 <svg id='svg1' width='200' height='100'> | 15 <svg id='svg1' width='200' height='100'> |
| 16 <rect id='rect1' x='10' y='20' width='130' height='40' rx='5'fill='blue'></rect> | 16 <rect id='rect1' x='10' y='20' width='130' height='40' rx='5'fill='blue'></rect> |
| 17 </svg> | 17 </svg> |
| 18 '''; | 18 '''; |
| 19 document.body.nodes.add(element); | 19 document.body.nodes.add(element); |
| 20 return element; | 20 return element; |
| 21 } | 21 } |
| 22 | 22 |
| 23 useHtmlConfiguration(); | 23 useHtmlConfiguration(); |
| 24 | 24 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 expect(r, isSvgLocatable); | 58 expect(r, isSvgLocatable); |
| 59 | 59 |
| 60 // Interfaces not implemented. | 60 // Interfaces not implemented. |
| 61 expect(r, isNot(isSvgNumber)); | 61 expect(r, isNot(isSvgNumber)); |
| 62 expect(r, isNot(isSvgRect)); | 62 expect(r, isNot(isSvgRect)); |
| 63 expect(r, isNot(isSvgSvgElement)); | 63 expect(r, isNot(isSvgSvgElement)); |
| 64 | 64 |
| 65 div.remove(); | 65 div.remove(); |
| 66 }); | 66 }); |
| 67 } | 67 } |
| OLD | NEW |