blob: 978b016c6e749c8e5547487d19a94301d7bf70f8 [file] [log] [blame]
description("Test cyclic for svg animations for syncbases");
embedSVGTestCase("resources/cyclic-syncbase.svg");
// Setup animation test
function sample1() {
shouldBeCloseEnough("rootSVGElement.getBBox().x", "100");
shouldBeCloseEnough("rootSVGElement.getBBox().y", "0");
}
function sample2() {
shouldBeCloseEnough("rootSVGElement.getBBox().x", "0");
shouldBeCloseEnough("rootSVGElement.getBBox().y", "100");
}
function executeTest() {
const expectedValues = [
// [animationId, time, sampleCallback]
["anim", 0.01, sample1],
["anim", 1.01, sample2],
["anim", 2.01, sample1],
["anim", 3.01, sample2],
["anim", 4.01, sample1]
];
runAnimationTest(expectedValues);
}
window.animationStartsImmediately = true;
var successfullyParsed = true;