Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / animations / script-tests / animate-elem-11-t-drt.js
blobf5f4451299677dcdbdbc337dd436c0f06698c9fa
1 description("A copy of the corresponding W3C-SVG-1.1 test, which dumps the animation at certain times");
2 embedSVGTestCase("../W3C-SVG-1.1/animate-elem-11-t.svg");
4 // Setup animation test
5 function sample1() {
6 shouldBeCloseEnough("rect1.height.animVal.value", "210");
7 shouldBe("rect1.height.baseVal.value", "210");
8 expectTranslationMatrix("rootSVGElement.getTransformToElement(rect2)", "-250", "-250");
11 function sample2() {
12 shouldBeCloseEnough("rect1.height.animVal.value", "143.4");
13 shouldBe("rect1.height.baseVal.value", "210");
14 expectTranslationMatrix("rootSVGElement.getTransformToElement(rect2)", "-250", "-183.4");
17 function sample3() {
18 shouldBeCloseEnough("rect1.height.animVal.value", "76.7");
19 shouldBe("rect1.height.baseVal.value", "210");
20 expectTranslationMatrix("rootSVGElement.getTransformToElement(rect2)", "-250", "-116.7");
23 function sample4() {
24 shouldBeCloseEnough("rect1.height.animVal.value", "10");
25 shouldBe("rect1.height.baseVal.value", "210");
26 expectTranslationMatrix("rootSVGElement.getTransformToElement(rect2)", "-250", "-50");
29 function executeTest() {
30 var rects = rootSVGElement.ownerDocument.getElementsByTagName("rect");
31 rect1 = rects[0];
32 rect2 = rects[1];
34 const expectedValues = [
35 // [animationId, time, sampleCallback]
36 ["an1", 0.0, sample1],
37 ["an1", 2.999, sample2],
38 ["an1", 3.001, sample2],
39 ["an1", 5.999, sample3],
40 ["an1", 6.001, sample3],
41 ["an1", 8.999, sample4],
42 ["an1", 9.001, sample4],
43 ["an1", 60.0, sample4]
46 runAnimationTest(expectedValues);
49 window.animationStartsImmediately = true;
50 var successfullyParsed = true;