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 <link rel=
"stylesheet" href=
"../../../../resources/testharness.css">
19 var doc
= newHTMLDocument();
20 var xsvg
= doc
.createElementNS(SVG_NAMESPACE
, 'x-svg');
22 assert_class_string(xsvg
, 'SVGElement', 'Unresolved custom element must be a SVG element');
23 }, 'Test interface of unresolved element with valid name, created by Document.createElementNS()');
27 var doc
= newHTMLDocument();
29 '<svg xmlns=' + SVG_NAMESPACE
+ ' version="1.1">' +
30 '<x-svg-a id="x-svg"></x-svg-a>' +
32 var xsvg
= doc
.querySelector('#x-svg');
34 assert_class_string(xsvg
, 'SVGElement', 'Unresolved custom element must be a SVG element');
35 }, 'Test interface of unresolved element with valid name, created via innerHTML property');
38 testInIFrame('../resources/x-svg-element.html', function(doc
) {
39 var xsvg
= doc
.getElementById('x-svg-element');
41 assert_not_equals(xsvg
, null, 'Unresolved custom element should not be null');
43 assert_class_string(xsvg
, 'SVGElement',
44 'Unresolved custom element must be a SVG element');
45 }, 'Test interface of unresolved element in loaded HTML document with embedded SVG elements');