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

Unified Diff: LayoutTests/svg/animations/script-tests/animateMotion-fill-freeze.js

Issue 21262002: [SVG] animateMotion is freezing at the end by default (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 months 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
Index: LayoutTests/svg/animations/script-tests/animateMotion-fill-freeze.js
diff --git a/LayoutTests/svg/animations/script-tests/animateMotion-fill-freeze.js b/LayoutTests/svg/animations/script-tests/animateMotion-fill-freeze.js
new file mode 100644
index 0000000000000000000000000000000000000000..98c4084719a15998a655d568b2fbc5dd055b789b
--- /dev/null
+++ b/LayoutTests/svg/animations/script-tests/animateMotion-fill-freeze.js
@@ -0,0 +1,37 @@
+description("Test for animation freeze when repeatDur is not a multiple of dur");
+embedSVGTestCase("resources/animateMotion-fill-freeze.svg");
+
+// Setup animation test
+function sample1() {
+ shouldBeCloseEnough("rootSVGElement.getBBox().x", "0");
+}
+
+function sample2() {
+ shouldBeCloseEnough("rootSVGElement.getBBox().x", "50");
+}
+
+function sample3() {
+ shouldBeCloseEnough("rootSVGElement.getBBox().x", "100");
+}
+
+function sample4() {
+ shouldBeCloseEnough("rootSVGElement.getBBox().x", "100");
+}
+
+function executeTest() {
+ var rects = rootSVGElement.ownerDocument.getElementsByTagName("rect");
+ rect1 = rects[0];
+
+ const expectedValues = [
+ // [animationId, time, sampleCallback]
+ ["anim", 0.0, sample1],
+ ["anim", 2.0, sample2],
+ ["anim", 4.0, sample3],
+ ["anim", 6.0, sample4]
+ ];
+
+ runAnimationTest(expectedValues);
+}
+
+window.animationStartsImmediately = true;
+var successfullyParsed = true;

Powered by Google App Engine
This is Rietveld 408576698