Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / animations / script-tests / animateMotion-multiple.js
blob1b239e555cf51cc0e57f9345ecec71fc450bd035
1 description("Test for checking position of the svg element when multiple animateMotion are acting on it");
2 embedSVGTestCase("resources/animateMotion-multiple.svg");
4 // Setup animation test
5 function sample1() {
6 shouldBeCloseEnough("rootSVGElement.getBBox().x", "20");
9 function sample2() {
10 shouldBeCloseEnough("rootSVGElement.getBBox().x", "20");
13 function sample3() {
14 shouldBeCloseEnough("rootSVGElement.getBBox().x", "40");
17 function sample4() {
18 shouldBeCloseEnough("rootSVGElement.getBBox().x", "60");
21 function sample5() {
22 shouldBeCloseEnough("rootSVGElement.getBBox().x", "20");
25 function sample6() {
26 shouldBeCloseEnough("rootSVGElement.getBBox().x", "20");
29 function executeTest() {
30 var rects = rootSVGElement.ownerDocument.getElementsByTagName("rect");
31 rect1 = rects[0];
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]
43 runAnimationTest(expectedValues);
46 window.animationStartsImmediately = true;
47 var successfullyParsed = true;