3 <script src=
"../../resources/js-test.js"></script>
6 <div style=
"visibility:hidden">
10 description("Test that setting innerHTML and outerHTML properties works on SVG elements");
11 var svg
= document
.getElementsByTagName('svg')[0];
13 svg
.innerHTML
= "<rect/>";
14 shouldBeEqualToString("svg.innerHTML", '<rect></rect>');
15 shouldBeEqualToString("svg.firstChild.namespaceURI", 'http://www.w3.org/2000/svg');
17 svg
.innerHTML
= "<foreignobject><svg/></foreignobject>";
18 shouldBeEqualToString("svg.innerHTML", '<foreignObject><svg></svg></foreignObject>');
19 shouldBeEqualToString("svg.firstChild.namespaceURI", 'http://www.w3.org/2000/svg');
20 shouldBeEqualToString("svg.firstChild.firstChild.namespaceURI", 'http://www.w3.org/2000/svg');
22 svg
.innerHTML
= "<foreignobject><p>x</foreignobject>";
23 shouldBeEqualToString("svg.innerHTML", '<foreignObject><p>x</p></foreignObject>');
24 shouldBeEqualToString("svg.firstChild.namespaceURI", 'http://www.w3.org/2000/svg');
25 shouldBeEqualToString("svg.firstChild.firstChild.namespaceURI", 'http://www.w3.org/1999/xhtml');
27 svg
.outerHTML
= "<svg><circle/></svg>";
28 var svg
= document
.getElementsByTagName('svg')[0];
29 shouldBeEqualToString("svg.innerHTML", '<circle></circle>');
30 shouldBeEqualToString("svg.firstChild.namespaceURI", 'http://www.w3.org/2000/svg');