Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / innerHTML / innerHTML-svg-read.html
blob7e36c422ec45a0a63bf5c5b26a38b212b940f95e
1 <html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 </head>
5 <body>
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>
10 </div>
11 <script>
12 description("Test that accessing innerHTML and outerHTML properties works on SVG elements");
14 var tests = [
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]);
33 </script>
34 </body>
35 </html>