| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <title>Unresolved element interface must be SVGElement, if the namespace is SVG
Namespace</title> | |
| 5 <meta name="author" title="Sergey G. Grekhov" href="mailto:sgrekhov@unipro.ru"> | |
| 6 <meta name="author" title="Vasiliy Degtyarev" href="mailto:vasya@unipro.ru"> | |
| 7 <meta name="author" title="Aleksei Yu. Semenov" href="mailto:a.semenov@unipro.ru
"> | |
| 8 <meta name="assert" content="When an unresolved element is created, it's element
interface must be SVGElement if the namespace is SVG Namespace"> | |
| 9 <link rel="help" href="http://www.w3.org/TR/custom-elements/#registering-custom-
elements"> | |
| 10 <script src="../../../../resources/testharness.js"></script> | |
| 11 <script src="../../../../resources/testharnessreport.js"></script> | |
| 12 <script src="../testcommon.js"></script> | |
| 13 </head> | |
| 14 <body> | |
| 15 <div id="log"></div> | |
| 16 <script> | |
| 17 test(function() { | |
| 18 var doc = newHTMLDocument(); | |
| 19 var xsvg = doc.createElementNS(SVG_NAMESPACE, 'x-svg'); | |
| 20 | |
| 21 assert_class_string(xsvg, 'SVGElement', 'Unresolved custom element must be a
SVG element'); | |
| 22 }, 'Test interface of unresolved element with valid name, created by Document.cr
eateElementNS()'); | |
| 23 | |
| 24 | |
| 25 test(function() { | |
| 26 var doc = newHTMLDocument(); | |
| 27 doc.body.innerHTML = | |
| 28 '<svg xmlns=' + SVG_NAMESPACE + ' version="1.1">' + | |
| 29 '<x-svg-a id="x-svg"></x-svg-a>' + | |
| 30 '</svg>'; | |
| 31 var xsvg = doc.querySelector('#x-svg'); | |
| 32 | |
| 33 assert_class_string(xsvg, 'SVGElement', 'Unresolved custom element must be a
SVG element'); | |
| 34 }, 'Test interface of unresolved element with valid name, created via innerHTML
property'); | |
| 35 | |
| 36 | |
| 37 testInIFrame('../resources/x-svg-element.html', function(doc) { | |
| 38 var xsvg = doc.getElementById('x-svg-element'); | |
| 39 | |
| 40 assert_not_equals(xsvg, null, 'Unresolved custom element should not be null'
); | |
| 41 | |
| 42 assert_class_string(xsvg, 'SVGElement', | |
| 43 'Unresolved custom element must be a SVG element'); | |
| 44 }, 'Test interface of unresolved element in loaded HTML document with embedded S
VG elements'); | |
| 45 </script> | |
| 46 </body> | |
| 47 </html> | |
| OLD | NEW |