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

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

Issue 21624005: [SVG] Position set by low priority animation is ignored even though it is active (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-multiple.js
diff --git a/LayoutTests/svg/animations/script-tests/animateMotion-multiple.js b/LayoutTests/svg/animations/script-tests/animateMotion-multiple.js
new file mode 100755
index 0000000000000000000000000000000000000000..1b239e555cf51cc0e57f9345ecec71fc450bd035
--- /dev/null
+++ b/LayoutTests/svg/animations/script-tests/animateMotion-multiple.js
@@ -0,0 +1,47 @@
+description("Test for checking position of the svg element when multiple animateMotion are acting on it");
+embedSVGTestCase("resources/animateMotion-multiple.svg");
+
+// Setup animation test
+function sample1() {
+ shouldBeCloseEnough("rootSVGElement.getBBox().x", "20");
+}
+
+function sample2() {
+ shouldBeCloseEnough("rootSVGElement.getBBox().x", "20");
+}
+
+function sample3() {
+ shouldBeCloseEnough("rootSVGElement.getBBox().x", "40");
+}
+
+function sample4() {
+ shouldBeCloseEnough("rootSVGElement.getBBox().x", "60");
+}
+
+function sample5() {
+ shouldBeCloseEnough("rootSVGElement.getBBox().x", "20");
+}
+
+function sample6() {
+ shouldBeCloseEnough("rootSVGElement.getBBox().x", "20");
+}
+
+function executeTest() {
+ var rects = rootSVGElement.ownerDocument.getElementsByTagName("rect");
+ rect1 = rects[0];
+
+ const expectedValues = [
+ // [animationId, time, sampleCallback]
+ ["anim", 0.0, sample1],
+ ["anim", 1.0, sample2],
+ ["anim", 2.0, sample3],
+ ["anim", 4.0, sample4],
+ ["anim", 6.0, sample5],
+ ["anim", 7.0, sample6]
+ ];
+
+ runAnimationTest(expectedValues);
+}
+
+window.animationStartsImmediately = true;
+var successfullyParsed = true;

Powered by Google App Engine
This is Rietveld 408576698