OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <title>Test that width/height animation on SVGSVGElement is removed when the ani
mation ends</title> |
| 3 <script src="../../resources/testharness.js"></script> |
| 4 <script src="../../resources/testharnessreport.js"></script> |
| 5 <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 s
hould be zero when the animation has ended."); |
| 11 }); |
| 12 width_test.done(); |
| 13 } |
| 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."); |
| 17 }); |
| 18 height_test.done(); |
| 19 } |
| 20 </script> |
| 21 <svg style="background: red" width="0" height="0"> |
| 22 <set attributeName="width" to="100px" dur="1ms" begin="0s" onend="do_width_tes
t()"/> |
| 23 <set attributeName="height" to="100px" dur="1ms" begin="0s" onend="do_height_t
est()"/> |
| 24 </svg> |
| 25 <div id="log"></div> |
OLD | NEW |