blob: 01143431442e7b2cacb6b1c7230f431f9fc80f5d [file] [log] [blame]
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<text id="text1" font-size="20" fill="yellow">PASS</text>
</defs>
<!-- Don't crash when setting the href attribute while a filter resource is pending. -->
<use id="crasher" xlink:href="foo" filter="url(#nosuchfilter)"/>
<!-- Test both updating the href attribute and picking up the pending filter. -->
<use id="text_use" y="20" xlink:href="#foo" filter="url(#filter2)"/>
<filter id="filter2">
<!-- Green filter -->
<feColorMatrix type="matrix" values="0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0"/>
</filter>
<script>
<!-- Should not crash. -->
document.getElementById("crasher").setAttribute("xlink:href", "bar");
<!-- Should yield the filtered text -->
document.getElementById("text_use").setAttribute("xlink:href", "#text1");
if (window.testRunner)
testRunner.dumpAsText();
</script>
</svg>