| OLD | NEW |
| (Empty) |
| 1 <html xmlns="http://www.w3.org/1999/xhtml"> | |
| 2 <head> | |
| 3 <script>window.enablePixelTesting = true;</script> | |
| 4 <script src="../../resources/js-test.js"></script> | |
| 5 </head> | |
| 6 <body> | |
| 7 <svg id="svg" xmlns="http://www.w3.org/2000/svg" width="200" height="200"> | |
| 8 <text id="text" x="500 50 100 900 150" y="50">ABC</text> | |
| 9 <text id="reference" x="50 100 150" y="100">ABC</text> | |
| 10 </svg> | |
| 11 | |
| 12 <p id="description"></p> | |
| 13 <div id="console"></div> | |
| 14 <script type="text/javascript"> | |
| 15 <![CDATA[ | |
| 16 description("This is a test of the SVGLengthList::removeItem() API."); | |
| 17 | |
| 18 var svg = document.getElementById("svg"); | |
| 19 var text = document.getElementById("text"); | |
| 20 | |
| 21 debug(""); | |
| 22 debug("Check initial list state of text1"); | |
| 23 shouldBe("text.x.baseVal.numberOfItems", "5"); | |
| 24 shouldBe("text.x.baseVal.getItem(0).value", "500"); | |
| 25 shouldBe("text.x.baseVal.getItem(1).value", "50"); | |
| 26 shouldBe("text.x.baseVal.getItem(2).value", "100"); | |
| 27 shouldBe("text.x.baseVal.getItem(3).value", "900"); | |
| 28 shouldBe("text.x.baseVal.getItem(4).value", "150"); | |
| 29 shouldThrow("text.x.baseVal.getItem(5)"); | |
| 30 | |
| 31 debug(""); | |
| 32 debug("Remove fourth item of text1"); | |
| 33 shouldBe("text.x.baseVal.removeItem(0).value", "500"); | |
| 34 | |
| 35 debug(""); | |
| 36 debug("Remove third item of text1"); | |
| 37 shouldBe("text.x.baseVal.removeItem(2).value", "900"); | |
| 38 | |
| 39 debug(""); | |
| 40 debug("The test passes if you only see 'PASS' messages, and both text elemen
ts on top look the same"); | |
| 41 debug(""); | |
| 42 | |
| 43 ]]> | |
| 44 </script> | |
| 45 </body> | |
| 46 </html> | |
| OLD | NEW |