Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(767)

Unified Diff: third_party/WebKit/LayoutTests/animations/clear-svg-animation-effects.html

Issue 1474263002: Clear SVG Web Animation effects when animations exit their fill phase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_svgPathInterpolationType
Patch Set: Check rare data Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/KeyframeEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/KeyframeEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698