blob: 20d6fd9e6f8a8889a9200802de599260d55393b4 [file] [log] [blame]
<!doctype html>
<title>Test that width/height animation on SVGSVGElement is removed when the animation ends</title>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
var width_test = async_test("Test width");
var height_test = async_test("Test height");
function do_width_test() {
width_test.step(function() {
assert_equals(document.querySelector('svg').getBoundingClientRect().width, 0, "width should be zero when the animation has ended.");
});
width_test.done();
}
function do_height_test() {
height_test.step(function() {
assert_equals(document.querySelector('svg').getBoundingClientRect().height, 0, "height should be zero when the animation has ended.");
});
height_test.done();
}
</script>
<svg style="background: red" width="0" height="0">
<set attributeName="width" to="100px" dur="1ms" begin="0s" onend="do_width_test()"/>
<set attributeName="height" to="100px" dur="1ms" begin="0s" onend="do_height_test()"/>
</svg>
<div id="log"></div>