Index: LayoutTests/svg/custom/animate-svgsvgelement.html |
diff --git a/LayoutTests/svg/custom/animate-svgsvgelement.html b/LayoutTests/svg/custom/animate-svgsvgelement.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6c227679a96818d92335ea966823488c92aa3eae |
--- /dev/null |
+++ b/LayoutTests/svg/custom/animate-svgsvgelement.html |
@@ -0,0 +1,25 @@ |
+<!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').offsetWidth, 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').offsetHeight, 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> |