Index: LayoutTests/fast/dom/Range/create-contextual-fragment-from-svg-element-range.html |
diff --git a/LayoutTests/fast/dom/Range/create-contextual-fragment-from-svg-element-range.html b/LayoutTests/fast/dom/Range/create-contextual-fragment-from-svg-element-range.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..391f7d98260f841e1860442d459e28b4c8bc8437 |
--- /dev/null |
+++ b/LayoutTests/fast/dom/Range/create-contextual-fragment-from-svg-element-range.html |
@@ -0,0 +1,20 @@ |
+<!DOCTYPE html> |
+<p>Test of createContextualFragment from a Range whose container is an SVG element. If the test succeeds you will see the word "PASS" below.</p> |
+<p id="result"></p> |
+<svg width="300px" height="50px" viewBox="0 0 300 24" id="container"> |
+</svg> |
+<script> |
+if (window.testRunner) |
+ testRunner.dumpAsText(); |
+ |
+var contextSvg = document.getElementById('container'); |
+var range = document.createRange(); |
+range.setStart(contextSvg, 0); |
+var fragment = range.createContextualFragment('<text id="fragment" x="0" y="16" fontsize="16">Inserted fragment</text>'); |
+contextSvg.appendChild(fragment); |
+var text = document.getElementById('fragment'); |
+ |
+var result = document.getElementById('result'); |
+result.textContent = (text && text.parentElement === contextSvg && text.namespaceURI === 'http://www.w3.org/2000/svg') ? 'PASS' : 'FAIL'; |
+</script> |
+ |