blob: bcbddb7cefa1cd7a9387679cef00d56abefcf26c [file] [log] [blame]
<html>
<body>
<!-- Test for https://bugs.webkit.org/show_bug.cgi?id=93972 -->
<div id="result"></div>
<svg xmlns="http://www.w3.org/2000/svg">
<rect id="rect" height="100" fill="green">
<animate id="animation" attributeName="width" from="10" to="100" begin="0s" dur="indefinite" fill="freeze" />
</rect>
</svg>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function check() {
var width = document.getElementById('rect').width.animVal.value;
document.getElementById('result').innerHTML = (width == 100 ? "PASS: " : "FAIL: ") + 'animated width is ' + width;
if (window.testRunner)
testRunner.notifyDone();
}
window.setTimeout(function() {
var ani = document.getElementById('animation');
ani.setAttribute("from", "100");
ani.beginElement();
window.setTimeout(function() { check(); }, 0);
}, 0);
</script>
</body>
</html>