| Index: LayoutTests/svg/dynamic-updates/SVGUseElement-target-changed.html
|
| diff --git a/LayoutTests/svg/dynamic-updates/SVGUseElement-target-changed.html b/LayoutTests/svg/dynamic-updates/SVGUseElement-target-changed.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e233f2832d167a04091a29917760369bd89a99f5
|
| --- /dev/null
|
| +++ b/LayoutTests/svg/dynamic-updates/SVGUseElement-target-changed.html
|
| @@ -0,0 +1,32 @@
|
| +<!DOCTYPE html>
|
| +
|
| +<style>
|
| + svg { width: 500px; height: 500px; }
|
| +</style>
|
| +
|
| +<script src="../../resources/js-test.js"></script>
|
| +
|
| +<svg viewBox="0 0 1000 1000" version="1.1">
|
| + <defs id="defs">
|
| + <ellipse id="ellipse" cx="200" cy="150" rx="200" ry="150" fill="salmon"/>
|
| + </defs>
|
| + <use id="use" x="0" y="0" xlink:href="#ellipse"/>
|
| +</svg>
|
| +
|
| +<script>
|
| +description("Adding or removing the element referenced by <use> should update the rendering.");
|
| +
|
| +var defs = document.getElementById("defs");
|
| +var use = document.getElementById("use");
|
| +var ellipse = document.getElementById("ellipse");
|
| +var bigElipse = ellipse.cloneNode(true);
|
| +bigElipse.setAttribute("rx", "500");
|
| +
|
| +shouldBe("use.getBoundingClientRect().width", "200");
|
| +
|
| +ellipse.remove();
|
| +shouldBe("use.getBoundingClientRect().width", "0");
|
| +
|
| +defs.appendChild(bigElipse);
|
| +shouldBe("use.getBoundingClientRect().width", "500");
|
| +</script>
|
|
|