Index: third_party/WebKit/LayoutTests/animations/clear-svg-animation-effects.html |
diff --git a/third_party/WebKit/LayoutTests/animations/clear-svg-animation-effects.html b/third_party/WebKit/LayoutTests/animations/clear-svg-animation-effects.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a6cd5dec53c1a3a9f2c1965394077fad1924b0ee |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/animations/clear-svg-animation-effects.html |
@@ -0,0 +1,28 @@ |
+<script src="../resources/testharness.js"></script> |
+<script src="../resources/testharnessreport.js"></script> |
+<svg> |
+ <stop id="target" offset="1"/> |
+</svg> |
+<script> |
+var asyncHandle = async_test('SVG Attributes should return to their base values after animations have stopped applying.'); |
+ |
+var animation = target.animate([ |
+ {svgOffset: '0'}, |
+ {svgOffset: '0.5'}, |
+], 1000); |
+animation.pause(); |
+animation.currentTime = 500; |
+ |
+requestAnimationFrame(() => { |
+ asyncHandle.step(() => { |
+ assert_equals(target.offset.animVal, 0.25, 'Animation is in effect.'); |
+ }); |
+ animation.cancel(); |
+ requestAnimationFrame(() => { |
+ asyncHandle.step(() => { |
+ assert_equals(target.offset.animVal, 1, 'Animation is no longer in effect.'); |
+ }); |
+ asyncHandle.done(); |
+ }); |
+}); |
+</script> |