Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / svg / animations / script-tests / cyclic-syncbase.js
1 description("Test cyclic for svg animations for syncbases");
2 embedSVGTestCase("resources/cyclic-syncbase.svg");
3
4 // Setup animation test
5 function sample1() {
6     shouldBeCloseEnough("rootSVGElement.getBBox().x", "100");
7     shouldBeCloseEnough("rootSVGElement.getBBox().y", "0");
8 }
9
10 function sample2() {
11     shouldBeCloseEnough("rootSVGElement.getBBox().x", "0");
12     shouldBeCloseEnough("rootSVGElement.getBBox().y", "100");
13 }
14
15 function executeTest() {
16
17     const expectedValues = [
18         // [animationId, time, sampleCallback]
19         ["anim", 0.01,   sample1],
20         ["anim", 1.01,   sample2],
21         ["anim", 2.01,   sample1],
22         ["anim", 3.01,   sample2],
23         ["anim", 4.01,   sample1]
24     ];
25
26     runAnimationTest(expectedValues);
27 }
28
29 window.animationStartsImmediately = true;
30 var successfullyParsed = true;
31