OLD | NEW |
1 <html xmlns="http://www.w3.org/1999/xhtml"> | 1 <html xmlns="http://www.w3.org/1999/xhtml"> |
2 <head> | 2 <head> |
3 <script>window.enablePixelTesting = true;</script> | 3 <script>window.enablePixelTesting = true;</script> |
4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <svg id="svg" xmlns="http://www.w3.org/2000/svg" width="200" height="200"> | 7 <svg id="svg" xmlns="http://www.w3.org/2000/svg" width="200" height="200"> |
8 <text id="text1" x="50" y="50" rotate="90 180 270">ABC</text> | 8 <text id="text1" x="50" y="50" rotate="90 180 270">ABC</text> |
9 </svg> | 9 </svg> |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 shouldBe("text1.rotate.baseVal.getItem(null)", "text1.rotate.baseVal.getItem
(0)"); | 40 shouldBe("text1.rotate.baseVal.getItem(null)", "text1.rotate.baseVal.getItem
(0)"); |
41 | 41 |
42 debug(""); | 42 debug(""); |
43 debug("Test uncommon arguments for insertItemBefore()"); | 43 debug("Test uncommon arguments for insertItemBefore()"); |
44 shouldThrow("text1.rotate.baseVal.insertItemBefore(30)"); | 44 shouldThrow("text1.rotate.baseVal.insertItemBefore(30)"); |
45 shouldThrow("text1.rotate.baseVal.insertItemBefore('aString')"); | 45 shouldThrow("text1.rotate.baseVal.insertItemBefore('aString')"); |
46 shouldThrow("text1.rotate.baseVal.insertItemBefore(text1)"); | 46 shouldThrow("text1.rotate.baseVal.insertItemBefore(text1)"); |
47 shouldThrow("text1.rotate.baseVal.insertItemBefore(null)"); | 47 shouldThrow("text1.rotate.baseVal.insertItemBefore(null)"); |
48 | 48 |
49 shouldBe("text1.rotate.baseVal.insertItemBefore(text1.rotate.baseVal.getItem
(1), 'aString')", "text1.rotate.baseVal.getItem(0)"); | 49 shouldBe("text1.rotate.baseVal.insertItemBefore(text1.rotate.baseVal.getItem
(1), 'aString')", "text1.rotate.baseVal.getItem(0)"); |
50 shouldBe("text1.rotate.baseVal.numberOfItems", "3"); | 50 shouldBe("text1.rotate.baseVal.numberOfItems", "4"); |
51 shouldBe("text1.rotate.baseVal.getItem(0).value", "180"); | 51 shouldBe("text1.rotate.baseVal.getItem(0).value", "180"); |
52 shouldBe("text1.rotate.baseVal.getItem(1).value", "90"); | 52 shouldBe("text1.rotate.baseVal.getItem(1).value", "90"); |
53 shouldBe("text1.rotate.baseVal.getItem(2).value", "270"); | 53 shouldBe("text1.rotate.baseVal.getItem(2).value", "180"); |
54 shouldBeEqualToString("text1.getAttribute('rotate')", "180 90 270"); | 54 shouldBe("text1.rotate.baseVal.getItem(3).value", "270"); |
| 55 shouldBeEqualToString("text1.getAttribute('rotate')", "180 90 180 270"); |
55 | 56 |
56 shouldBe("text1.rotate.baseVal.insertItemBefore(text1.rotate.baseVal.getItem
(1), text1)", "text1.rotate.baseVal.getItem(0)"); | 57 shouldBe("text1.rotate.baseVal.insertItemBefore(text1.rotate.baseVal.getItem
(1), text1)", "text1.rotate.baseVal.getItem(0)"); |
57 shouldBe("text1.rotate.baseVal.numberOfItems", "3"); | 58 shouldBe("text1.rotate.baseVal.numberOfItems", "5"); |
58 shouldBe("text1.rotate.baseVal.getItem(0).value", "90"); | 59 shouldBe("text1.rotate.baseVal.getItem(0).value", "90"); |
59 shouldBe("text1.rotate.baseVal.getItem(1).value", "180"); | 60 shouldBe("text1.rotate.baseVal.getItem(1).value", "180"); |
60 shouldBe("text1.rotate.baseVal.getItem(2).value", "270"); | 61 shouldBe("text1.rotate.baseVal.getItem(2).value", "90"); |
61 shouldBeEqualToString("text1.getAttribute('rotate')", "90 180 270"); | 62 shouldBe("text1.rotate.baseVal.getItem(3).value", "180"); |
| 63 shouldBe("text1.rotate.baseVal.getItem(4).value", "270"); |
| 64 shouldBeEqualToString("text1.getAttribute('rotate')", "90 180 90 180 270"); |
62 | 65 |
63 shouldBe("text1.rotate.baseVal.insertItemBefore(text1.rotate.baseVal.getItem
(1), null)", "text1.rotate.baseVal.getItem(0)"); | 66 shouldBe("text1.rotate.baseVal.insertItemBefore(text1.rotate.baseVal.getItem
(1), null)", "text1.rotate.baseVal.getItem(0)"); |
64 shouldBe("text1.rotate.baseVal.numberOfItems", "3"); | 67 shouldBe("text1.rotate.baseVal.numberOfItems", "6"); |
65 shouldBe("text1.rotate.baseVal.getItem(0).value", "180"); | 68 shouldBe("text1.rotate.baseVal.getItem(0).value", "180"); |
66 shouldBe("text1.rotate.baseVal.getItem(1).value", "90"); | 69 shouldBe("text1.rotate.baseVal.getItem(1).value", "90"); |
67 shouldBe("text1.rotate.baseVal.getItem(2).value", "270"); | 70 shouldBe("text1.rotate.baseVal.getItem(2).value", "180"); |
68 shouldBeEqualToString("text1.getAttribute('rotate')", "180 90 270"); | 71 shouldBe("text1.rotate.baseVal.getItem(3).value", "90"); |
| 72 shouldBe("text1.rotate.baseVal.getItem(4).value", "180"); |
| 73 shouldBe("text1.rotate.baseVal.getItem(5).value", "270"); |
| 74 shouldBeEqualToString("text1.getAttribute('rotate')", "180 90 180 90 180 270
"); |
69 | 75 |
70 shouldBe("text1.rotate.baseVal.insertItemBefore(text1.rotate.baseVal.getItem
(1), 0)", "text1.rotate.baseVal.getItem(0)"); | 76 shouldBe("text1.rotate.baseVal.insertItemBefore(text1.rotate.baseVal.getItem
(1), 0)", "text1.rotate.baseVal.getItem(0)"); |
71 shouldBe("text1.rotate.baseVal.numberOfItems", "3"); | 77 shouldBe("text1.rotate.baseVal.numberOfItems", "7"); |
72 shouldBe("text1.rotate.baseVal.getItem(0).value", "90"); | 78 shouldBe("text1.rotate.baseVal.getItem(0).value", "90"); |
73 shouldBe("text1.rotate.baseVal.getItem(1).value", "180"); | 79 shouldBe("text1.rotate.baseVal.getItem(1).value", "180"); |
74 shouldBe("text1.rotate.baseVal.getItem(2).value", "270"); | 80 shouldBe("text1.rotate.baseVal.getItem(2).value", "90"); |
75 shouldBeEqualToString("text1.getAttribute('rotate')", "90 180 270"); | 81 shouldBe("text1.rotate.baseVal.getItem(3).value", "180"); |
| 82 shouldBe("text1.rotate.baseVal.getItem(4).value", "90"); |
| 83 shouldBe("text1.rotate.baseVal.getItem(5).value", "180"); |
| 84 shouldBe("text1.rotate.baseVal.getItem(6).value", "270");; |
| 85 shouldBeEqualToString("text1.getAttribute('rotate')", "90 180 90 180 90 180
270"); |
76 | 86 |
77 shouldThrow("text1.rotate.baseVal.insertItemBefore(30, 0)"); | 87 shouldThrow("text1.rotate.baseVal.insertItemBefore(30, 0)"); |
78 shouldThrow("text1.rotate.baseVal.insertItemBefore('aString', 0)"); | 88 shouldThrow("text1.rotate.baseVal.insertItemBefore('aString', 0)"); |
79 shouldThrow("text1.rotate.baseVal.insertItemBefore(text1, 0)"); | 89 shouldThrow("text1.rotate.baseVal.insertItemBefore(text1, 0)"); |
80 shouldThrow("text1.rotate.baseVal.insertItemBefore(null, 0)"); | 90 shouldThrow("text1.rotate.baseVal.insertItemBefore(null, 0)"); |
81 | 91 |
82 debug(""); | 92 debug(""); |
83 debug("Set rotate='1 2 3 4' for text1"); | 93 debug("Set rotate='1 2 3 4' for text1"); |
84 shouldBeUndefined("text1.setAttribute('rotate', '1 2 3 4')"); | 94 shouldBeUndefined("text1.setAttribute('rotate', '1 2 3 4')"); |
85 shouldBe("text1.rotate.baseVal.numberOfItems", "4"); | 95 shouldBe("text1.rotate.baseVal.numberOfItems", "4"); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 | 176 |
167 debug(""); | 177 debug(""); |
168 debug("Testing animVal clear throws"); | 178 debug("Testing animVal clear throws"); |
169 shouldThrow("text1.rotate.animVal.clear()"); | 179 shouldThrow("text1.rotate.animVal.clear()"); |
170 shouldBeUndefined("text1.rotate.baseVal.clear()"); | 180 shouldBeUndefined("text1.rotate.baseVal.clear()"); |
171 | 181 |
172 ]]> | 182 ]]> |
173 </script> | 183 </script> |
174 </body> | 184 </body> |
175 </html> | 185 </html> |
OLD | NEW |