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="text1" x="50 100 150" y="50">ABC</text> | |
9 </svg> | |
10 | |
11 <p id="description"></p> | |
12 <div id="console"></div> | |
13 <script type="text/javascript"> | |
14 <![CDATA[ | |
15 description("This is a test of the SVGLengthList::getItem() API."); | |
16 | |
17 var svg = document.getElementById("svg"); | |
18 var text1 = document.getElementById("text1"); | |
19 | |
20 debug("Check lengths of text x item lists"); | |
21 shouldBe("text1.x.baseVal.numberOfItems", "3"); | |
22 | |
23 debug(""); | |
24 debug("Test with various index parameters"); | |
25 shouldThrow("text1.x.baseVal.getItem(-100)"); | |
26 shouldThrow("text1.x.baseVal.getItem(-1)"); | |
27 shouldBe("text1.x.baseVal.getItem(0).value", "50"); | |
28 shouldBe("text1.x.baseVal.getItem(1).value", "100"); | |
29 shouldBe("text1.x.baseVal.getItem(2).value", "150"); | |
30 shouldThrow("text1.x.baseVal.getItem(3)"); | |
31 shouldThrow("text1.x.baseVal.getItem(100)"); | |
32 | |
33 ]]> | |
34 </script> | |
35 </body> | |
36 </html> | |
OLD | NEW |