| OLD | NEW |
| (Empty) |
| 1 description("This test checks the SVGAnimatedNumberList API - utilizing the rota
te property of SVGTextElement"); | |
| 2 | |
| 3 var textElement = document.createElementNS("http://www.w3.org/2000/svg", "text")
; | |
| 4 textElement.setAttribute("rotate", "50"); | |
| 5 | |
| 6 debug(""); | |
| 7 debug("Check initial rotate value"); | |
| 8 shouldBeEqualToString("textElement.rotate.toString()", "[object SVGAnimatedNumbe
rList]"); | |
| 9 shouldBeEqualToString("textElement.rotate.baseVal.toString()", "[object SVGNumbe
rList]"); | |
| 10 shouldBe("textElement.rotate.baseVal.getItem(0).value", "50"); | |
| 11 | |
| 12 debug(""); | |
| 13 debug("Check that number lists are dynamic, caching value in a local variable an
d modifying it, should take effect"); | |
| 14 var numRef = textElement.rotate.baseVal; | |
| 15 numRef.getItem(0).value = 100; | |
| 16 shouldBe("numRef.getItem(0).value", "100"); | |
| 17 shouldBe("textElement.rotate.baseVal.getItem(0).value", "100"); | |
| 18 | |
| 19 debug(""); | |
| 20 debug("Check that assigning to baseVal has no effect, as no setter is defined"); | |
| 21 shouldBe("textElement.rotate.baseVal = -1", "-1"); | |
| 22 shouldBeEqualToString("textElement.rotate.baseVal = 'aString'", "aString"); | |
| 23 shouldBe("textElement.rotate.baseVal = textElement", "textElement"); | |
| 24 | |
| 25 debug(""); | |
| 26 debug("Check that the rotate value remained 100, and the baseVal type has not be
en changed"); | |
| 27 shouldBeEqualToString("textElement.rotate.baseVal.toString()", "[object SVGNumbe
rList]"); | |
| 28 shouldBe("textElement.rotate.baseVal.getItem(0).value", "100"); | |
| 29 | |
| 30 successfullyParsed = true; | |
| OLD | NEW |