Index: third_party/WebKit/LayoutTests/svg/dom/SVGLengthList-initialize.xhtml |
diff --git a/third_party/WebKit/LayoutTests/svg/dom/SVGLengthList-initialize.xhtml b/third_party/WebKit/LayoutTests/svg/dom/SVGLengthList-initialize.xhtml |
deleted file mode 100644 |
index 787489a2af250113027239eaf672ee70d081f7b0..0000000000000000000000000000000000000000 |
--- a/third_party/WebKit/LayoutTests/svg/dom/SVGLengthList-initialize.xhtml |
+++ /dev/null |
@@ -1,125 +0,0 @@ |
-<html xmlns="http://www.w3.org/1999/xhtml"> |
-<head> |
-<script>window.enablePixelTesting = true;</script> |
-<script src="../../resources/js-test.js"></script> |
-</head> |
-<body> |
-<svg id="svg" xmlns="http://www.w3.org/2000/svg" width="200" height="200"> |
- <text id="text1" x="500 1000 1500" y="25"> ABC </text> |
- <text id="text2" x="50 500" y="50"> ABC </text> |
- <text id="text3" x="50 500 50" y="75">ABC</text> |
- <text id="text4" x="500" y="100">ABC</text> |
- <text id="reference" x="50" y="125">ABC</text> |
-</svg> |
- |
-<p id="description"></p> |
-<div id="console"></div> |
-<script type="text/javascript"> |
-<![CDATA[ |
- description("This is a test of the SVGLengthList::initialize() API."); |
- |
- var svg = document.getElementById("svg"); |
- var text1 = document.getElementById("text1"); |
- var text2 = document.getElementById("text2"); |
- var text3 = document.getElementById("text3"); |
- var text4 = document.getElementById("text4"); |
- |
- debug("Check initial list state of text1"); |
- shouldBe("text1.x.baseVal.numberOfItems", "3"); |
- shouldBe("text1.x.baseVal.getItem(0).value", "500"); |
- shouldBe("text1.x.baseVal.getItem(1).value", "1000"); |
- shouldBe("text1.x.baseVal.getItem(2).value", "1500"); |
- shouldThrow("text1.x.baseVal.getItem(3)"); |
- |
- debug(""); |
- debug("Check initial list state of text2"); |
- shouldBe("text2.x.baseVal.numberOfItems", "2"); |
- shouldBe("text2.x.baseVal.getItem(0).value", "50"); |
- shouldBe("text2.x.baseVal.getItem(1).value", "500"); |
- shouldThrow("text2.x.baseVal.getItem(2)"); |
- |
- debug(""); |
- debug("Check initial list state of text3"); |
- shouldBe("text3.x.baseVal.numberOfItems", "3"); |
- shouldBe("text3.x.baseVal.getItem(0).value", "50"); |
- shouldBe("text3.x.baseVal.getItem(1).value", "500"); |
- shouldBe("text3.x.baseVal.getItem(2).value", "50"); |
- shouldThrow("text3.x.baseVal.getItem(3)"); |
- |
- debug(""); |
- debug("Check initial list state of text4"); |
- shouldBe("text4.x.baseVal.numberOfItems", "1"); |
- shouldBe("text4.x.baseVal.getItem(0).value", "500"); |
- shouldThrow("text4.x.baseVal.getItem(1)"); |
- |
- debug(""); |
- debug("Create a new SVGLength object, that will be the only x coordinate in the first text element."); |
- var newLength = svg.createSVGLength(); |
- newLength.value = 50; |
- shouldBe("newLength.value", "50"); |
- |
- // Spec: Clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter. |
- debug(""); |
- debug("Initialize SVGLengthList with 'newLength'"); |
- shouldBe("text1.x.baseVal.initialize(newLength)", "newLength"); |
- shouldBe("text1.x.baseVal.getItem(0)", "newLength"); |
- |
- debug(""); |
- debug("Take the second x item '500' of the second text element, store it in 'itemInAnotherList' change it to '50'"); |
- shouldBe("text2.x.baseVal.getItem(1).value", "500"); |
- var itemInAnotherList = text2.x.baseVal.getItem(1); |
- itemInAnotherList.value = 50; |
- shouldBe("text2.x.baseVal.getItem(1).value", "50"); |
- |
- // Spec: If newItem is already in a list, then a new object is created with the same values as newItem and this item is inserted into the list. |
- // Otherwise, newItem itself is inserted into the list.. |
- debug(""); |
- debug("Override the third text elements x list with the item x=50 from the second text element, where it should not be removed afterwards"); |
- shouldBe("text3.x.baseVal.initialize(itemInAnotherList)", "itemInAnotherList"); |
- shouldBe("text3.x.baseVal.getItem(0).value", "50"); |
- shouldBe("text2.x.baseVal.getItem(0).value", "50"); |
- shouldNotThrow("text2.x.baseVal.getItem(1)"); |
- |
- debug("") |
- debug("Assure that the 'itemInAnotherList' item is still live anymore, set value to 999 then back to 50"); |
- shouldBe("itemInAnotherList.value = 999;", "999"); |
- shouldBe("itemInAnotherList.value", "999"); |
- shouldBe("text3.x.baseVal.getItem(0).value", "50"); |
- shouldBe("itemInAnotherList.value = 50;", "50"); |
- shouldBe("itemInAnotherList.value", "50"); |
- shouldBe("text3.x.baseVal.getItem(0).value", "50"); |
- |
- debug(""); |
- debug("Copy item from text3 to text4"); |
- shouldBe("text4.x.baseVal.initialize(text3.x.baseVal.getItem(0))", "itemInAnotherList"); |
- shouldBe("text4.x.baseVal.getItem(0).value", "50"); |
- shouldNotThrow("text3.x.baseVal.getItem(0)"); |
- |
- debug(""); |
- debug("Initialize text2 using setAttribute('x', '50')"); |
- text2.setAttribute("x", "50"); |
- shouldBe("text2.x.baseVal.getItem(0).value", "50"); |
- |
- debug(""); |
- debug("Final check whether the lists all look like expected"); |
- shouldBe("text1.x.baseVal.getItem(0).value", "50"); |
- shouldBe("text2.x.baseVal.getItem(0).value", "50"); |
- shouldBe("text3.x.baseVal.getItem(0).value", "50"); |
- shouldBe("text4.x.baseVal.getItem(0).value", "50"); |
- shouldBe("text1.x.baseVal.numberOfItems", "1"); |
- shouldBe("text2.x.baseVal.numberOfItems", "1"); |
- shouldBe("text3.x.baseVal.numberOfItems", "1"); |
- shouldBe("text4.x.baseVal.numberOfItems", "1"); |
- shouldThrow("text1.x.baseVal.getItem(1)"); |
- shouldThrow("text2.x.baseVal.getItem(1)"); |
- shouldThrow("text3.x.baseVal.getItem(1)"); |
- shouldThrow("text4.x.baseVal.getItem(1)"); |
- |
- debug(""); |
- debug("The test passes if you only see 'PASS' messages, and all five text elements on top look the same"); |
- debug(""); |
- |
-]]> |
-</script> |
-</body> |
-</html> |