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

Unified Diff: LayoutTests/svg/animations/script-tests/animate-fill-freeze-with-repeatDur.js

Issue 19946002: [SVG] Handle animation freeze when 'repeatDur' is not a multiple of 'dur' (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/animate-fill-freeze-with-repeatDur.js
diff --git a/LayoutTests/svg/animations/script-tests/animate-fill-freeze-with-repeatDur.js b/LayoutTests/svg/animations/script-tests/animate-fill-freeze-with-repeatDur.js
new file mode 100755
index 0000000000000000000000000000000000000000..1fdc436f2e47772e71afa503d1a1a3e9501c8d34
--- /dev/null
+++ b/LayoutTests/svg/animations/script-tests/animate-fill-freeze-with-repeatDur.js
@@ -0,0 +1,29 @@
+description("Test for animation freeze when repeatDur is not a multiple of dur");
+embedSVGTestCase("resources/animate-fill-freeze-with-repeatDur.svg");
+
+// Setup animation test
+function sample1() {
+ shouldBeCloseEnough("rect1.x.animVal.value", "0");
+ shouldBe("rect1.x.baseVal.value", "0");
+}
+
+function sample2() {
+ shouldBeCloseEnough("rect1.x.animVal.value", "150");
+ shouldBe("rect1.x.baseVal.value", "0");
+}
+
+function executeTest() {
+ var rects = rootSVGElement.ownerDocument.getElementsByTagName("rect");
+ rect1 = rects[0];
+
+ const expectedValues = [
+ // [animationId, time, sampleCallback]
+ ["anim", 0.0, sample1],
+ ["anim", 6.0, sample2]
+ ];
+
+ runAnimationTest(expectedValues);
+}
+
+window.animationStartsImmediately = true;
+var successfullyParsed = true;

Powered by Google App Engine
This is Rietveld 408576698