4 <title>Unresolved element interface must be HTMLUnknownElement, if the namespace is neither HTML Namespace nor SVG Namespace
</title>
5 <meta name=
"author" title=
"Aleksei Yu. Semenov" href=
"mailto:a.semenov@unipro.ru">
6 <meta name=
"assert" content=
"When an unresolved element is created, it's element interface must be HTMLUnknownElement, if the namespace is neither HTML Namespace nor SVG Namespace">
7 <link rel=
"help" href=
"http://www.w3.org/TR/custom-elements/#registering-custom-elements">
8 <script src=
"../../../../resources/testharness.js"></script>
9 <script src=
"../../../../resources/testharnessreport.js"></script>
10 <script src=
"../testcommon.js"></script>
11 <link rel=
"stylesheet" href=
"../../../../resources/testharness.css">
16 var MATHML_NAMESPACE
= 'http://www.w3.org/1998/Math/MathML';
19 var doc
= newHTMLDocument();
21 '<math xmlns="' + MATHML_NAMESPACE
+ '">' +
22 '<x-a id="x-a"></x-a>' +
24 var xa
= doc
.querySelector('#x-a');
26 assert_not_equals(xa
, null, 'Unregistered custom element should not be null');
28 // According https://code.google.com/p/chromium/issues/detail?id=336377
29 // expected class string is Element
30 assert_class_string(xa
, 'Element', 'Unresolved custom element must be an Element');
31 }, 'Test interface of unresolved element with MathML namespace, created via innerHTML property');
35 var doc
= newHTMLDocument();
36 var xa
= doc
.createElementNS(MATHML_NAMESPACE
, 'x-b');
38 assert_class_string(xa
, 'Element',
39 'Unresolved custom element must be a HTMLUnknownElement');
40 }, 'Test interface of unresolved element with MathML namespace, ' +
41 'created by Document.createElementNS');
44 testInIFrame('../resources/x-mathml-element.html', function(doc
) {
45 var customElement
= doc
.getElementById('x-math-element');
47 assert_not_equals(customElement
, null, 'Unregistered custom element should not be null');
49 assert_class_string(customElement
, 'Element',
50 'Unresolved custom element must be a Element');
51 }, 'Test interface of unresolved element in loaded HTML document with embedded MathML elements');