2 <html xmlns=
"http://www.w3.org/1999/xhtml">
4 <script src=
"../../resources/js-test.js"></script>
9 <svg xmlns=
"http://www.w3.org/2000/svg"></svg>
10 <bar xmlns=
"http://test/foo"></bar>
12 description("Test innerHTML in XHTML/XML documents");
15 "http://www.w3.org/2000/svg",
29 function g(ns
, elementName
, text
, appendOrSelect
) {
30 if (appendOrSelect
== "append") {
31 element
= document
.createElementNS(ns
, elementName
);
32 document
.body
.appendChild(element
);
35 element
= document
.querySelector(elementName
);
36 childns
= element
.namespaceURI
;
38 element
.innerHTML
= text
;
39 shouldBeEqualToString("element.firstChild.namespaceURI", childns
);
42 namespaces
.forEach(function(ns
) {
43 elementnames
.forEach(function(elementname
) {
44 texts
.forEach(function(text
) {
45 g(ns
, elementname
, text
, "append");
46 g(ns
, elementname
, text
, "select");