OLD | NEW |
(Empty) | |
| 1 description("Test for checking position of the svg element when multiple animate
Motion are acting on it"); |
| 2 embedSVGTestCase("resources/animateMotion-multiple.svg"); |
| 3 |
| 4 // Setup animation test |
| 5 function sample1() { |
| 6 shouldBeCloseEnough("rootSVGElement.getBBox().x", "20"); |
| 7 } |
| 8 |
| 9 function sample2() { |
| 10 shouldBeCloseEnough("rootSVGElement.getBBox().x", "20"); |
| 11 } |
| 12 |
| 13 function sample3() { |
| 14 shouldBeCloseEnough("rootSVGElement.getBBox().x", "40"); |
| 15 } |
| 16 |
| 17 function sample4() { |
| 18 shouldBeCloseEnough("rootSVGElement.getBBox().x", "60"); |
| 19 } |
| 20 |
| 21 function sample5() { |
| 22 shouldBeCloseEnough("rootSVGElement.getBBox().x", "20"); |
| 23 } |
| 24 |
| 25 function sample6() { |
| 26 shouldBeCloseEnough("rootSVGElement.getBBox().x", "20"); |
| 27 } |
| 28 |
| 29 function executeTest() { |
| 30 var rects = rootSVGElement.ownerDocument.getElementsByTagName("rect"); |
| 31 rect1 = rects[0]; |
| 32 |
| 33 const expectedValues = [ |
| 34 // [animationId, time, sampleCallback] |
| 35 ["anim", 0.0, sample1], |
| 36 ["anim", 1.0, sample2], |
| 37 ["anim", 2.0, sample3], |
| 38 ["anim", 4.0, sample4], |
| 39 ["anim", 6.0, sample5], |
| 40 ["anim", 7.0, sample6] |
| 41 ]; |
| 42 |
| 43 runAnimationTest(expectedValues); |
| 44 } |
| 45 |
| 46 window.animationStartsImmediately = true; |
| 47 var successfullyParsed = true; |
OLD | NEW |