3 <script src=
"../../resources/js-test.js"></script>
6 <div style=
"visibility:hidden">
7 <svg id=
"emptysvg"></svg>
8 <svg id=
"rectsvg"><rect/></svg>
9 <svg id=
"foreign" width=
"100" height=
"30"><foreignObject width=
"100" height=
"30"><p>html
</p></foreignObject></svg>
12 description("Test that accessing innerHTML and outerHTML properties works on SVG elements");
15 ['innerHTML("emptysvg")' , ''],
16 ['innerHTML("rectsvg")' , '<rect></rect>' ],
17 ['innerHTML("foreign")' , '<foreignObject width="100" height="30"><p>html</p></foreignObject>' ],
18 ['outerHTML("emptysvg")' , '<svg id="emptysvg"></svg>'],
19 ['outerHTML("rectsvg")' , '<svg id="rectsvg"><rect></rect></svg>' ],
22 function innerHTML(id
) {
23 return document
.getElementById(id
).innerHTML
;
26 function outerHTML(id
) {
27 return document
.getElementById(id
).outerHTML
;
30 for (var i
in tests
) {
31 shouldBeEqualToString(tests
[i
][0], tests
[i
][1]);