| OLD | NEW |
| 1 description("A copy of the corresponding W3C-SVG-1.1 test, which dumps the anima
tion at certain times"); | 1 description("A copy of the corresponding W3C-SVG-1.1 test, which dumps the anima
tion at certain times"); |
| 2 embedSVGTestCase("../W3C-SVG-1.1/animate-elem-08-t.svg"); | 2 embedSVGTestCase("../W3C-SVG-1.1/animate-elem-08-t.svg"); |
| 3 | 3 |
| 4 // Setup animation test | 4 // Setup animation test |
| 5 function sample1() { | 5 function sample1() { |
| 6 expectMatrix("rootSVGElement.getTransformToElement(path1)", "0", "1", "-1",
"0", "224.9", "-25.9"); | 6 expectMatrix("getTransformToElement(rootSVGElement, path1)", "0", "1", "-1",
"0", "224.9", "-25.9"); |
| 7 expectMatrix("rootSVGElement.getTransformToElement(path2)", "0", "-1", "1",
"0", "-223.9", "275.9"); | 7 expectMatrix("getTransformToElement(rootSVGElement, path2)", "0", "-1", "1",
"0", "-223.9", "275.9"); |
| 8 } | 8 } |
| 9 | 9 |
| 10 function sample2() { | 10 function sample2() { |
| 11 expectMatrix("rootSVGElement.getTransformToElement(path1)", "1", "0.1", "-0.
1", "1", "-70.3", "-182.8"); | 11 expectMatrix("getTransformToElement(rootSVGElement, path1)", "1", "0.1", "-0
.1", "1", "-70.3", "-182.8"); |
| 12 expectMatrix("rootSVGElement.getTransformToElement(path2)", "-1", "-0.1", "0
.1", "-1", "318.6", "211.6"); | 12 expectMatrix("getTransformToElement(rootSVGElement, path2)", "-1", "-0.1", "
0.1", "-1", "318.6", "211.6"); |
| 13 } | 13 } |
| 14 | 14 |
| 15 function sample3() { | 15 function sample3() { |
| 16 expectMatrix("rootSVGElement.getTransformToElement(path1)", "0.7", "-0.7", "
0.7", "0.7", "-265.1", "-18.9"); | 16 expectMatrix("getTransformToElement(rootSVGElement, path1)", "0.7", "-0.7",
"0.7", "0.7", "-265.1", "-18.9"); |
| 17 expectMatrix("rootSVGElement.getTransformToElement(path2)", "-0.7", "0.7", "
-0.7", "-0.7", "442.7", "-156.9"); | 17 expectMatrix("getTransformToElement(rootSVGElement, path2)", "-0.7", "0.7",
"-0.7", "-0.7", "442.7", "-156.9"); |
| 18 } | 18 } |
| 19 | 19 |
| 20 function executeTest() { | 20 function executeTest() { |
| 21 path1 = rootSVGElement.ownerDocument.getElementsByTagName("path")[1]; | 21 path1 = rootSVGElement.ownerDocument.getElementsByTagName("path")[1]; |
| 22 path2 = rootSVGElement.ownerDocument.getElementsByTagName("path")[3]; | 22 path2 = rootSVGElement.ownerDocument.getElementsByTagName("path")[3]; |
| 23 | 23 |
| 24 const expectedValues = [ | 24 const expectedValues = [ |
| 25 // [animationId, time, sampleCallback] | 25 // [animationId, time, sampleCallback] |
| 26 ["an1", 0.0, sample1], | 26 ["an1", 0.0, sample1], |
| 27 ["an1", 3.0, sample2], | 27 ["an1", 3.0, sample2], |
| 28 ["an1", 6.0, sample3], | 28 ["an1", 6.0, sample3], |
| 29 ["an1", 60.0, sample3] | 29 ["an1", 60.0, sample3] |
| 30 ]; | 30 ]; |
| 31 | 31 |
| 32 runAnimationTest(expectedValues); | 32 runAnimationTest(expectedValues); |
| 33 } | 33 } |
| 34 | 34 |
| 35 window.animationStartsImmediately = true; | 35 window.animationStartsImmediately = true; |
| 36 var successfullyParsed = true; | 36 var successfullyParsed = true; |
| OLD | NEW |