2 <title>Test that width/height animation on SVGSVGElement is removed when the animation ends
</title>
3 <script src=
"../../resources/testharness.js"></script>
4 <script src=
"../../resources/testharnessreport.js"></script>
6 var width_test
= async_test("Test width");
7 var height_test
= async_test("Test height");
8 function do_width_test() {
9 width_test
.step(function() {
10 assert_equals(document
.querySelector('svg').offsetWidth
, 0, "width should be zero when the animation has ended.");
14 function do_height_test() {
15 height_test
.step(function() {
16 assert_equals(document
.querySelector('svg').offsetHeight
, 0, "height should be zero when the animation has ended.");
21 <svg style=
"background: red" width=
"0" height=
"0">
22 <set attributeName=
"width" to=
"100px" dur=
"1ms" begin=
"0s" onend=
"do_width_test()"/>
23 <set attributeName=
"height" to=
"100px" dur=
"1ms" begin=
"0s" onend=
"do_height_test()"/>