Index: LayoutTests/svg/dom/SVGLengthList-appendItem.xhtml |
diff --git a/LayoutTests/svg/dom/SVGLengthList-appendItem.xhtml b/LayoutTests/svg/dom/SVGLengthList-appendItem.xhtml |
index 80640e8a42127d56c0281ea84888b9dcd09bebf7..95c5b6be451789b20fc637fa984b100e1c70f3b2 100644 |
--- a/LayoutTests/svg/dom/SVGLengthList-appendItem.xhtml |
+++ b/LayoutTests/svg/dom/SVGLengthList-appendItem.xhtml |
@@ -46,80 +46,88 @@ |
debug(""); |
debug("Append fourth item x=900 to the text1 x list"); |
- shouldBe("text1.x.baseVal.appendItem(text1.x.baseVal.getItem(3))", "text1.x.baseVal.getItem(4)"); |
- shouldBe("text1.x.baseVal.numberOfItems", "5"); |
+ shouldBe("text1.x.baseVal.appendItem(text1.x.baseVal.getItem(3))", "text1.x.baseVal.getItem(5)"); |
+ shouldBe("text1.x.baseVal.numberOfItems", "6"); |
shouldBe("text1.x.baseVal.getItem(0).value", "500"); |
shouldBe("text1.x.baseVal.getItem(1).value", "50"); |
shouldBe("text1.x.baseVal.getItem(2).value", "100"); |
- shouldBe("text1.x.baseVal.getItem(3).value", "1000"); |
- shouldBe("text1.x.baseVal.getItem(4).value", "900"); |
- shouldThrow("text1.x.baseVal.getItem(5)"); |
+ shouldBe("text1.x.baseVal.getItem(3).value", "900"); |
+ shouldBe("text1.x.baseVal.getItem(4).value", "1000"); |
+ shouldBe("text1.x.baseVal.getItem(5).value", "900"); |
+ shouldThrow("text1.x.baseVal.getItem(6)"); |
debug(""); |
debug("Append first item x=500 to the text1 x list"); |
- shouldBe("text1.x.baseVal.appendItem(text1.x.baseVal.getItem(0))", "text1.x.baseVal.getItem(4)"); |
- shouldBe("text1.x.baseVal.numberOfItems", "5"); |
- shouldBe("text1.x.baseVal.getItem(0).value", "50"); |
- shouldBe("text1.x.baseVal.getItem(1).value", "100"); |
- shouldBe("text1.x.baseVal.getItem(2).value", "1000"); |
+ shouldBe("text1.x.baseVal.appendItem(text1.x.baseVal.getItem(0))", "text1.x.baseVal.getItem(6)"); |
+ shouldBe("text1.x.baseVal.numberOfItems", "7"); |
+ shouldBe("text1.x.baseVal.getItem(0).value", "500"); |
+ shouldBe("text1.x.baseVal.getItem(1).value", "50"); |
+ shouldBe("text1.x.baseVal.getItem(2).value", "100"); |
shouldBe("text1.x.baseVal.getItem(3).value", "900"); |
- shouldBe("text1.x.baseVal.getItem(4).value", "500"); |
- shouldThrow("text1.x.baseVal.getItem(5)"); |
+ shouldBe("text1.x.baseVal.getItem(4).value", "1000"); |
+ shouldBe("text1.x.baseVal.getItem(5).value", "900"); |
+ shouldBe("text1.x.baseVal.getItem(6).value", "500"); |
+ shouldThrow("text1.x.baseVal.getItem(7)"); |
debug(""); |
debug("Append 'newLength1' to the text1 x list"); |
- shouldBe("text1.x.baseVal.appendItem(newLength1)", "text1.x.baseVal.getItem(5)"); |
- shouldBe("text1.x.baseVal.numberOfItems", "6"); |
- shouldBe("text1.x.baseVal.getItem(0).value", "50"); |
- shouldBe("text1.x.baseVal.getItem(1).value", "100"); |
- shouldBe("text1.x.baseVal.getItem(2).value", "1000"); |
+ shouldBe("text1.x.baseVal.appendItem(newLength1)", "text1.x.baseVal.getItem(7)"); |
+ shouldBe("text1.x.baseVal.numberOfItems", "8"); |
+ shouldBe("text1.x.baseVal.getItem(0).value", "500"); |
+ shouldBe("text1.x.baseVal.getItem(1).value", "50"); |
+ shouldBe("text1.x.baseVal.getItem(2).value", "100"); |
shouldBe("text1.x.baseVal.getItem(3).value", "900"); |
- shouldBe("text1.x.baseVal.getItem(4).value", "500"); |
- shouldBe("text1.x.baseVal.getItem(5).value", "150"); |
- shouldThrow("text1.x.baseVal.getItem(6)"); |
+ shouldBe("text1.x.baseVal.getItem(4).value", "1000"); |
+ shouldBe("text1.x.baseVal.getItem(5).value", "900"); |
+ shouldBe("text1.x.baseVal.getItem(6).value", "500"); |
+ shouldBe("text1.x.baseVal.getItem(7).value", "150"); |
+ shouldThrow("text1.x.baseVal.getItem(8)"); |
debug(""); |
debug("Append third and fourth item of the text1 x list to the text2 x list"); |
- shouldBe("text2.x.baseVal.appendItem(text1.x.baseVal.getItem(2)).value", "1000"); |
- shouldBe("text2.x.baseVal.appendItem(text1.x.baseVal.getItem(2)).value", "900"); |
- shouldBe("text1.x.baseVal.numberOfItems", "4"); |
- shouldBe("text1.x.baseVal.getItem(0).value", "50"); |
- shouldBe("text1.x.baseVal.getItem(1).value", "100"); |
- shouldBe("text1.x.baseVal.getItem(2).value", "500"); |
- shouldBe("text1.x.baseVal.getItem(3).value", "150"); |
- shouldThrow("text1.x.baseVal.getItem(4)"); |
+ shouldBe("text2.x.baseVal.appendItem(text1.x.baseVal.getItem(2)).value", "100"); |
+ shouldBe("text2.x.baseVal.appendItem(text1.x.baseVal.getItem(3)).value", "900"); |
+ shouldBe("text1.x.baseVal.numberOfItems", "8"); |
+ shouldBe("text1.x.baseVal.getItem(0).value", "500"); |
+ shouldBe("text1.x.baseVal.getItem(1).value", "50"); |
+ shouldBe("text1.x.baseVal.getItem(2).value", "100"); |
+ shouldBe("text1.x.baseVal.getItem(3).value", "900"); |
+ shouldBe("text1.x.baseVal.getItem(4).value", "1000"); |
+ shouldBe("text1.x.baseVal.getItem(5).value", "900"); |
+ shouldBe("text1.x.baseVal.getItem(6).value", "500"); |
+ shouldBe("text1.x.baseVal.getItem(7).value", "150"); |
+ shouldThrow("text1.x.baseVal.getItem(8)"); |
shouldBe("text2.x.baseVal.numberOfItems", "5"); |
shouldBe("text2.x.baseVal.getItem(0).value", "50"); |
shouldBe("text2.x.baseVal.getItem(1).value", "100"); |
shouldBe("text2.x.baseVal.getItem(2).value", "1000"); |
- shouldBe("text2.x.baseVal.getItem(3).value", "1000"); |
+ shouldBe("text2.x.baseVal.getItem(3).value", "100"); |
shouldBe("text2.x.baseVal.getItem(4).value", "900"); |
shouldThrow("text2.x.baseVal.getItem(5)"); |
var newLength2 = svg.createSVGLength(); |
newLength2.value = 150; |
shouldBe("newLength2.value", "150"); |
- |
+ shouldBeUndefined("text1.x.baseVal.clear()"); |
+ |
debug(""); |
debug("Shuffle around items in text1 and text2 list using appendItem, to get x=50,100,150,... in both lists"); |
- shouldBe("text1.x.baseVal.appendItem(text1.x.baseVal.getItem(2)).value", "500"); |
- shouldBe("text2.x.baseVal.appendItem(newLength2).value", "150"); |
- shouldBe("text2.x.baseVal.appendItem(text2.x.baseVal.getItem(2)).value", "1000"); |
- shouldBe("text2.x.baseVal.appendItem(text2.x.baseVal.getItem(3)).value", "900"); |
- shouldBe("text2.x.baseVal.appendItem(text2.x.baseVal.getItem(2)).value", "1000"); |
- shouldBe("text1.x.baseVal.numberOfItems", "4"); |
+ shouldBe("text1.x.baseVal.appendItem(text2.x.baseVal.getItem(0)).value", "50"); |
+ shouldBe("text1.x.baseVal.appendItem(text2.x.baseVal.getItem(1)).value", "100"); |
+ shouldBe("text1.x.baseVal.appendItem(newLength2).value", "150"); |
+ shouldBeUndefined("text2.x.baseVal.clear()"); |
+ shouldBe("text2.x.baseVal.appendItem(text1.x.baseVal.getItem(0)).value", "50"); |
+ shouldBe("text2.x.baseVal.appendItem(text1.x.baseVal.getItem(1)).value", "100"); |
+ shouldBe("text2.x.baseVal.appendItem(text1.x.baseVal.getItem(2)).value", "150"); |
+ shouldBe("text1.x.baseVal.numberOfItems", "3"); |
shouldBe("text1.x.baseVal.getItem(0).value", "50"); |
shouldBe("text1.x.baseVal.getItem(1).value", "100"); |
shouldBe("text1.x.baseVal.getItem(2).value", "150"); |
- shouldBe("text1.x.baseVal.getItem(3).value", "500"); |
shouldThrow("text1.x.baseVal.getItem(4)"); |
- shouldBe("text2.x.baseVal.numberOfItems", "6"); |
+ shouldBe("text2.x.baseVal.numberOfItems", "3"); |
shouldBe("text2.x.baseVal.getItem(0).value", "50"); |
shouldBe("text2.x.baseVal.getItem(1).value", "100"); |
shouldBe("text2.x.baseVal.getItem(2).value", "150"); |
- shouldBe("text2.x.baseVal.getItem(3).value", "1000"); |
- shouldBe("text2.x.baseVal.getItem(4).value", "900"); |
- shouldBe("text2.x.baseVal.getItem(5).value", "1000"); |
shouldThrow("text2.x.baseVal.getItem(6)"); |
debug(""); |