blob: b0b71519dfc4afcb59d797bd645874388d02ea07 [file] [log] [blame]
<svg id="svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="load()">
<defs>
<rect id="rect" width="100" height="100" />
</defs>
<g id="g"/>
<script xlink:href="../../resources/js-test.js"></script>
<script id="script">
<![CDATA[
'use strict';
// This test relies on --enable-leak-detection to catch leaks
function createAnimatedRectInstance() {
var use = document.createElementNS("http://www.w3.org/2000/svg", "use");
use.setAttributeNS("http://www.w3.org/1999/xlink", "href", "#rect");
var anim = document.createElementNS("http://www.w3.org/2000/svg", "animate");
anim.setAttribute("attributeType", "XML");
anim.setAttribute("attributeName", "x");
anim.setAttribute("from", "100");
anim.setAttribute("to", "0");
anim.setAttribute("begin", "0s");
anim.setAttribute("dur", "10.0s");
anim.setAttribute("repeatCount", 1);
use.appendChild(anim);
return use;
}
function load() {
var g = document.getElementById("g");
for (var i = 0; i < 100; i++)
g.appendChild(createAnimatedRectInstance());
}
]]>
</script>
</svg>