blob: cd1e2a09f10645189aa3a5d9d8cfb94a3683cb2b [file] [log] [blame]
<!DOCTYPE HTML>
<html>
<body>
<p>This test passes if there are two 100x100px green squares in a diagonal line below:</p>
<svg width="300" height="300">
<defs>
<svg id="svg" width="10" height="10">
<rect width="100%" height="100%" fill="green"/>
</svg>
</defs>
<use id="use1" xlink:href="#svg" x="0" y="0" width="100" height="100"/>
<use id="use2" xlink:href="#svg" x="100" y="100" width="10" height="10"/>
</svg>
<script>
// Force layout since the intention is to test behavior of changes *after* layout has occurred.
// FIXME: Find a clean reliable way to do this; Blink tests were using requestAnimationFrame,
// which seems like it would be racy and wrong, but perhaps they have some rationale for that.
document.body.offsetTop;
document.getElementById('use2').setAttribute('width', '100');
document.getElementById('use2').setAttribute('height', '100');
</script>
</body>
</html>