blob: 8c175f695b2a6eabb897d77b06d328b321559a1f [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<head>
<script>
if (window.testRunner)
testRunner.dumpAsText();
</script>
<style>
svg {
height: 0;
width: 0;
}
</style>
</head>
<p>This tests that we don't cause an assertion failure when re-parenting a &lt;use&gt; after removing its referenced element.</p>
<svg version="1.1">
<circle id="a"></circle>
<use xlink:href="#a" id="b"></use>
</svg>
<div id="c"></div>
<div id="a"></div>
<script>
var a = document.getElementById("a"); // <circle>
var b = document.getElementById("b"); // <use>
a.parentNode.removeChild(a);
b.appendChild(a);
b.parentNode.removeChild(b);
document.getElementById("c").appendChild(b);
</script>
<p>PASS</p>
</body>
</html>