| OLD | NEW |
| 1 description("This verifies several attributeTypes combiniations"); | 1 description("This verifies several attributeTypes combiniations"); |
| 2 embedSVGTestCase("resources/attributeTypes.svg"); | 2 embedSVGTestCase("resources/attributeTypes.svg"); |
| 3 | 3 |
| 4 // Setup animation test | 4 // Setup animation test |
| 5 function sample1() { | 5 function sample1() { |
| 6 shouldBeCloseEnough("rect1.width.animVal.value", "10"); | 6 shouldBeCloseEnough("rect1.width.animVal.value", "10"); |
| 7 shouldBe("rect1.width.baseVal.value", "10"); | 7 shouldBe("rect1.width.baseVal.value", "10"); |
| 8 expectFillColor(rect1, 0, 128, 0); | 8 expectFillColor(rect1, 0, 128, 0); |
| 9 | 9 |
| 10 shouldBe("rect2.width.animVal.value", "100"); | 10 shouldBe("rect2.width.animVal.value", "10"); |
| 11 shouldBe("rect2.width.baseVal.value", "100"); | 11 shouldBe("rect2.width.baseVal.value", "10"); |
| 12 expectFillColor(rect2, 0, 128, 0); | 12 expectFillColor(rect2, 0, 128, 0); |
| 13 | 13 |
| 14 shouldBe("rect3.width.animVal.value", "100"); | 14 shouldBe("rect3.width.animVal.value", "100"); |
| 15 shouldBe("rect3.width.baseVal.value", "100"); | 15 shouldBe("rect3.width.baseVal.value", "100"); |
| 16 expectFillColor(rect3, 255, 0, 0); | 16 expectFillColor(rect3, 255, 0, 0); |
| 17 shouldBeEqualToString("rect3.getAttribute('fill')", "red"); | 17 shouldBeEqualToString("rect3.getAttribute('fill')", "red"); |
| 18 | 18 |
| 19 shouldBe("rect4.width.animVal.value", "100"); | 19 shouldBe("rect4.width.animVal.value", "100"); |
| 20 shouldBe("rect4.width.baseVal.value", "100"); | 20 shouldBe("rect4.width.baseVal.value", "100"); |
| 21 expectFillColor(rect4, 255, 0, 0); | 21 expectFillColor(rect4, 255, 0, 0); |
| 22 shouldBeEqualToString("rect4.getAttribute('fill')", "red"); | 22 shouldBeEqualToString("rect4.getAttribute('fill')", "red"); |
| 23 } | 23 } |
| 24 | 24 |
| 25 function sample2() { | 25 function sample2() { |
| 26 shouldBeCloseEnough("rect1.width.animVal.value", "55"); | 26 shouldBeCloseEnough("rect1.width.animVal.value", "55"); |
| 27 shouldBe("rect1.width.baseVal.value", "10"); | 27 shouldBe("rect1.width.baseVal.value", "10"); |
| 28 expectFillColor(rect1, 0, 128, 0); | 28 expectFillColor(rect1, 0, 128, 0); |
| 29 | 29 |
| 30 shouldBe("rect2.width.animVal.value", "100"); | 30 shouldBe("rect2.width.animVal.value", "55"); |
| 31 shouldBe("rect2.width.baseVal.value", "100"); | 31 shouldBe("rect2.width.baseVal.value", "10"); |
| 32 expectFillColor(rect2, 0, 128, 0); | 32 expectFillColor(rect2, 0, 128, 0); |
| 33 | 33 |
| 34 shouldBe("rect3.width.animVal.value", "100"); | 34 shouldBe("rect3.width.animVal.value", "100"); |
| 35 shouldBe("rect3.width.baseVal.value", "100"); | 35 shouldBe("rect3.width.baseVal.value", "100"); |
| 36 expectFillColor(rect3, 128, 64, 0); | 36 expectFillColor(rect3, 128, 64, 0); |
| 37 shouldBeEqualToString("rect3.getAttribute('fill')", "red"); | 37 shouldBeEqualToString("rect3.getAttribute('fill')", "red"); |
| 38 | 38 |
| 39 shouldBe("rect4.width.animVal.value", "100"); | 39 shouldBe("rect4.width.animVal.value", "100"); |
| 40 shouldBe("rect4.width.baseVal.value", "100"); | 40 shouldBe("rect4.width.baseVal.value", "100"); |
| 41 expectFillColor(rect4, 128, 64, 0); | 41 expectFillColor(rect4, 128, 64, 0); |
| 42 shouldBeEqualToString("rect4.getAttribute('fill')", "red"); | 42 shouldBeEqualToString("rect4.getAttribute('fill')", "red"); |
| 43 } | 43 } |
| 44 | 44 |
| 45 function sample3() { | 45 function sample3() { |
| 46 shouldBeCloseEnough("rect1.width.animVal.value", "100"); | 46 shouldBeCloseEnough("rect1.width.animVal.value", "100"); |
| 47 shouldBe("rect1.width.baseVal.value", "10"); | 47 shouldBe("rect1.width.baseVal.value", "10"); |
| 48 expectFillColor(rect1, 0, 128, 0); | 48 expectFillColor(rect1, 0, 128, 0); |
| 49 | 49 |
| 50 shouldBe("rect2.width.animVal.value", "100"); | 50 shouldBe("rect2.width.animVal.value", "100"); |
| 51 shouldBe("rect2.width.baseVal.value", "100"); | 51 shouldBe("rect2.width.baseVal.value", "10"); |
| 52 expectFillColor(rect2, 0, 128, 0); | 52 expectFillColor(rect2, 0, 128, 0); |
| 53 | 53 |
| 54 shouldBe("rect3.width.animVal.value", "100"); | 54 shouldBe("rect3.width.animVal.value", "100"); |
| 55 shouldBe("rect3.width.baseVal.value", "100"); | 55 shouldBe("rect3.width.baseVal.value", "100"); |
| 56 expectFillColor(rect3, 0, 128, 0); | 56 expectFillColor(rect3, 0, 128, 0); |
| 57 shouldBeEqualToString("rect3.getAttribute('fill')", "red"); | 57 shouldBeEqualToString("rect3.getAttribute('fill')", "red"); |
| 58 | 58 |
| 59 shouldBe("rect4.width.animVal.value", "100"); | 59 shouldBe("rect4.width.animVal.value", "100"); |
| 60 shouldBe("rect4.width.baseVal.value", "100"); | 60 shouldBe("rect4.width.baseVal.value", "100"); |
| 61 expectFillColor(rect4, 0, 128, 0); | 61 expectFillColor(rect4, 0, 128, 0); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 76 ["an1", 2.0, sample2], | 76 ["an1", 2.0, sample2], |
| 77 ["an1", 4.0, sample3], | 77 ["an1", 4.0, sample3], |
| 78 ["an1", 60.0, sample3], | 78 ["an1", 60.0, sample3], |
| 79 ]; | 79 ]; |
| 80 | 80 |
| 81 runAnimationTest(expectedValues); | 81 runAnimationTest(expectedValues); |
| 82 } | 82 } |
| 83 | 83 |
| 84 window.animationStartsImmediately = true; | 84 window.animationStartsImmediately = true; |
| 85 var successfullyParsed = true; | 85 var successfullyParsed = true; |
| OLD | NEW |