Index: LayoutTests/fast/innerHTML/innerHTML-svg-read.html |
diff --git a/LayoutTests/fast/innerHTML/innerHTML-svg-read.html b/LayoutTests/fast/innerHTML/innerHTML-svg-read.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c42440b7fb0881899594e706235ea54adf5d6436 |
--- /dev/null |
+++ b/LayoutTests/fast/innerHTML/innerHTML-svg-read.html |
@@ -0,0 +1,36 @@ |
+<html> |
+<head> |
+<script src="../js/resources/js-test-pre.js"></script> |
+</head> |
+<body> |
+<div style="visibility:hidden"> |
+ <svg id="emptysvg"></svg> |
+ <svg id="rectsvg"><rect/></svg> |
+ <svg id="foreign" width="100" height="30"><foreignObject width="100" height="30"><p>html</p></foreignObject></svg> |
+</div> |
+<script> |
+description("Test that accessing innerHTML and outerHTML properties works on SVG elements"); |
+ |
+var tests = [ |
+ ['innerHTML("emptysvg")' , ''], |
+ ['innerHTML("rectsvg")' , '<rect></rect>' ], |
+ ['innerHTML("foreign")' , '<foreignObject width="100" height="30"><p>html</p></foreignObject>' ], |
+ ['outerHTML("emptysvg")' , '<svg id="emptysvg"></svg>'], |
+ ['outerHTML("rectsvg")' , '<svg id="rectsvg"><rect></rect></svg>' ], |
+ ]; |
+ |
+function innerHTML(id) { |
+ return document.getElementById(id).innerHTML; |
+} |
+ |
+function outerHTML(id) { |
+ return document.getElementById(id).outerHTML; |
+} |
+ |
+for (var i in tests) { |
+ shouldBeEqualToString(tests[i][0], tests[i][1]); |
+} |
+</script> |
+<script src="../js/resources/js-test-post.js"></script> |
+</body> |
+</html> |