Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(783)

Unified Diff: LayoutTests/fast/innerHTML/innerHTML-svg-read.html

Issue 44333002: Move innerHTML and outerHTML to Element (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased to latest master Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>
« no previous file with comments | « no previous file | LayoutTests/fast/innerHTML/innerHTML-svg-read-expected.txt » ('j') | Source/core/html/parser/HTMLTreeBuilder.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698