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="../../fast/js/resources/js-test-pre.js"></script> | 4 <script src="../../fast/js/resources/js-test-pre.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 |
11 <p id="description"></p> | 11 <p id="description"></p> |
12 <div id="console"></div> | 12 <div id="console"></div> |
13 <script type="text/javascript"> | 13 <script type="text/javascript"> |
14 <![CDATA[ | 14 <![CDATA[ |
15 description("This is a test of the simple SVGNumberList API parts."); | 15 description("This is a test of the simple SVGNumberList API parts."); |
16 | 16 |
| 17 if (window.testRunner) |
| 18 testRunner.dumpAsText(); |
| 19 |
17 var text1 = document.getElementById("text1"); | 20 var text1 = document.getElementById("text1"); |
18 | 21 |
19 // Spec: The object referenced by animVal will always be distinct from the o
ne referenced by baseVal, even when the attribute is not animated. | 22 // Spec: The object referenced by animVal will always be distinct from the o
ne referenced by baseVal, even when the attribute is not animated. |
20 shouldBeTrue("text1.rotate.baseVal != text1.rotate.animVal"); | 23 shouldBeTrue("text1.rotate.baseVal != text1.rotate.animVal"); |
21 | 24 |
22 shouldBe("text1.rotate.baseVal.numberOfItems", "3"); | 25 shouldBe("text1.rotate.baseVal.numberOfItems", "3"); |
23 shouldBe("text1.rotate.animVal.numberOfItems", "3"); | 26 shouldBe("text1.rotate.animVal.numberOfItems", "3"); |
24 | 27 |
25 debug(""); | 28 debug(""); |
26 debug("Test uncommon arguments for initialize()"); | 29 debug("Test uncommon arguments for initialize()"); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 shouldThrow("text1.rotate.baseVal.replaceItem(30)"); | 94 shouldThrow("text1.rotate.baseVal.replaceItem(30)"); |
92 shouldThrow("text1.rotate.baseVal.replaceItem('aString')"); | 95 shouldThrow("text1.rotate.baseVal.replaceItem('aString')"); |
93 shouldThrow("text1.rotate.baseVal.replaceItem(text1)"); | 96 shouldThrow("text1.rotate.baseVal.replaceItem(text1)"); |
94 shouldThrow("text1.rotate.baseVal.replaceItem(null)"); | 97 shouldThrow("text1.rotate.baseVal.replaceItem(null)"); |
95 shouldThrow("text1.rotate.baseVal.replaceItem(30, 0)"); | 98 shouldThrow("text1.rotate.baseVal.replaceItem(30, 0)"); |
96 shouldThrow("text1.rotate.baseVal.replaceItem('aString', 0)"); | 99 shouldThrow("text1.rotate.baseVal.replaceItem('aString', 0)"); |
97 shouldThrow("text1.rotate.baseVal.replaceItem(text1, 0)"); | 100 shouldThrow("text1.rotate.baseVal.replaceItem(text1, 0)"); |
98 shouldThrow("text1.rotate.baseVal.replaceItem(null, 0)"); | 101 shouldThrow("text1.rotate.baseVal.replaceItem(null, 0)"); |
99 | 102 |
100 shouldBe("text1.rotate.baseVal.replaceItem(text1.rotate.baseVal.getItem(0),
0)", "text1.rotate.baseVal.getItem(0)"); | 103 shouldBe("text1.rotate.baseVal.replaceItem(text1.rotate.baseVal.getItem(0),
0)", "text1.rotate.baseVal.getItem(0)"); |
101 shouldBe("text1.rotate.baseVal.numberOfItems", "3"); | 104 shouldBe("text1.rotate.baseVal.numberOfItems", "4"); |
102 shouldBe("text1.rotate.baseVal.getItem(0).value", "1"); | 105 shouldBe("text1.rotate.baseVal.getItem(0).value", "1"); |
103 shouldBe("text1.rotate.baseVal.getItem(1).value", "3"); | 106 shouldBe("text1.rotate.baseVal.getItem(1).value", "2"); |
104 shouldBe("text1.rotate.baseVal.getItem(2).value", "4"); | 107 shouldBe("text1.rotate.baseVal.getItem(2).value", "3"); |
105 shouldBeEqualToString("text1.getAttribute('rotate')", "1 3 4"); | 108 shouldBe("text1.rotate.baseVal.getItem(3).value", "4"); |
| 109 shouldBeEqualToString("text1.getAttribute('rotate')", "1 2 3 4"); |
106 | 110 |
107 shouldBe("text1.rotate.baseVal.replaceItem(text1.rotate.baseVal.getItem(0),
'aString')", "text1.rotate.baseVal.getItem(0)"); | 111 shouldBe("text1.rotate.baseVal.replaceItem(text1.rotate.baseVal.getItem(0),
'aString')", "text1.rotate.baseVal.getItem(0)"); |
108 shouldBe("text1.rotate.baseVal.numberOfItems", "2"); | 112 shouldBe("text1.rotate.baseVal.numberOfItems", "4"); |
109 shouldBe("text1.rotate.baseVal.getItem(0).value", "1"); | 113 shouldBe("text1.rotate.baseVal.getItem(0).value", "1"); |
110 shouldBe("text1.rotate.baseVal.getItem(1).value", "4"); | 114 shouldBe("text1.rotate.baseVal.getItem(1).value", "2"); |
111 shouldBeEqualToString("text1.getAttribute('rotate')", "1 4"); | 115 shouldBe("text1.rotate.baseVal.getItem(2).value", "3"); |
| 116 shouldBe("text1.rotate.baseVal.getItem(3).value", "4"); |
| 117 shouldBeEqualToString("text1.getAttribute('rotate')", "1 2 3 4"); |
112 | 118 |
113 shouldBe("text1.rotate.baseVal.replaceItem(text1.rotate.baseVal.getItem(0),
text1)", "text1.rotate.baseVal.getItem(0)"); | 119 shouldBe("text1.rotate.baseVal.replaceItem(text1.rotate.baseVal.getItem(0),
text1)", "text1.rotate.baseVal.getItem(0)"); |
114 shouldBe("text1.rotate.baseVal.numberOfItems", "1"); | 120 shouldBe("text1.rotate.baseVal.numberOfItems", "4"); |
115 shouldBeEqualToString("text1.getAttribute('rotate')", "1"); | 121 shouldBeEqualToString("text1.getAttribute('rotate')", "1 2 3 4"); |
116 | 122 |
117 shouldThrow("text1.rotate.baseVal.replaceItem(text1.rotate.baseVal.getItem(0
), null)"); | 123 shouldBe("text1.rotate.baseVal.replaceItem(text1.rotate.baseVal.getItem(0),
null)", "text1.rotate.baseVal.getItem(0)"); |
118 shouldBe("text1.rotate.baseVal.numberOfItems", "0"); | 124 shouldBe("text1.rotate.baseVal.numberOfItems", "4"); |
119 shouldBeEqualToString("text1.getAttribute('rotate')", ""); | 125 shouldBeEqualToString("text1.getAttribute('rotate')", "1 2 3 4"); |
120 | 126 |
121 debug(""); | 127 debug(""); |
122 debug("Set rotate='1 2 3 4' for text1"); | 128 debug("Set rotate='1 2 3 4' for text1"); |
123 shouldBeUndefined("text1.setAttribute('rotate', '1 2 3 4')"); | 129 shouldBeUndefined("text1.setAttribute('rotate', '1 2 3 4')"); |
124 | 130 |
125 debug(""); | 131 debug(""); |
126 debug("Test uncommon arguents for removeItem()"); | 132 debug("Test uncommon arguents for removeItem()"); |
127 shouldThrow("text1.rotate.baseVal.removeItem(30)"); | 133 shouldThrow("text1.rotate.baseVal.removeItem(30)"); |
128 | 134 |
129 shouldBe("text1.rotate.baseVal.removeItem('aString').value", "1"); | 135 shouldBe("text1.rotate.baseVal.removeItem('aString').value", "1"); |
(...skipping 24 matching lines...) Expand all Loading... |
154 debug(""); | 160 debug(""); |
155 debug("Testing animVal clear throws"); | 161 debug("Testing animVal clear throws"); |
156 shouldThrow("text1.rotate.animVal.clear()"); | 162 shouldThrow("text1.rotate.animVal.clear()"); |
157 shouldBeUndefined("text1.rotate.baseVal.clear()"); | 163 shouldBeUndefined("text1.rotate.baseVal.clear()"); |
158 | 164 |
159 ]]> | 165 ]]> |
160 </script> | 166 </script> |
161 <script src="../../fast/js/resources/js-test-post.js"></script> | 167 <script src="../../fast/js/resources/js-test-post.js"></script> |
162 </body> | 168 </body> |
163 </html> | 169 </html> |
OLD | NEW |