| OLD | NEW |
| (Empty) |
| 1 description("This test checks the SVGAnimatedAngle API - utilizing the orientAng
le property of SVGMarkerElement"); | |
| 2 | |
| 3 var markerElement = document.createElementNS("http://www.w3.org/2000/svg", "mark
er"); | |
| 4 | |
| 5 debug(""); | |
| 6 debug("Check initial orientAngle value"); | |
| 7 shouldBeEqualToString("markerElement.orientAngle.toString()", "[object SVGAnimat
edAngle]"); | |
| 8 shouldBeEqualToString("markerElement.orientAngle.baseVal.toString()", "[object S
VGAngle]"); | |
| 9 shouldBe("markerElement.orientAngle.baseVal.value", "0"); | |
| 10 | |
| 11 debug(""); | |
| 12 debug("Check that angles are dynamic, caching value in a local variable and modi
fying it, should take effect"); | |
| 13 var numRef = markerElement.orientAngle.baseVal; | |
| 14 numRef.value = 100; | |
| 15 shouldBe("numRef.value", "100"); | |
| 16 shouldBe("markerElement.orientAngle.baseVal.value", "100"); | |
| 17 | |
| 18 debug(""); | |
| 19 debug("Check that assigning to baseVal has no effect, as no setter is defined"); | |
| 20 shouldBe("markerElement.orientAngle.baseVal = -1", "-1"); | |
| 21 shouldBeEqualToString("markerElement.orientAngle.baseVal = 'aString'", "aString"
); | |
| 22 shouldBe("markerElement.orientAngle.baseVal = markerElement", "markerElement"); | |
| 23 | |
| 24 debug(""); | |
| 25 debug("Check that the orientAngle value remained 100, and the baseVal type has n
ot been changed"); | |
| 26 shouldBeEqualToString("markerElement.orientAngle.baseVal.toString()", "[object S
VGAngle]"); | |
| 27 shouldBe("markerElement.orientAngle.baseVal.value", "100"); | |
| 28 | |
| 29 successfullyParsed = true; | |
| OLD | NEW |