OLD | NEW |
1 <html> | 1 <html> |
2 <head id="head"> | 2 <head id="head"> |
3 <script src="../../resources/js-test.js"></script> | 3 <script src="../../resources/js-test.js"></script> |
4 </head> | 4 </head> |
5 <body> | 5 <body> |
6 <script> | 6 <script> |
7 | 7 |
8 description("This tests parsing and re-serialization of some CSS selectors."); | 8 description("This tests parsing and re-serialization of some CSS selectors."); |
9 | 9 |
10 function parseThenSerializeRule(rule) | 10 function parseThenSerializeRule(rule) |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 testSelectorRoundTrip(':-webkit-any(:hover)'); | 130 testSelectorRoundTrip(':-webkit-any(:hover)'); |
131 testSelectorRoundTrip('input:-webkit-any([type="file"],:hover,:focus):enabled'); | 131 testSelectorRoundTrip('input:-webkit-any([type="file"],:hover,:focus):enabled'); |
132 testSelectorRoundTrip(':-webkit-any(input[type="file"],a:hover,button:focus)'); | 132 testSelectorRoundTrip(':-webkit-any(input[type="file"],a:hover,button:focus)'); |
133 testSelectorRoundTrip(':-webkit-any(.class1.class2.class3)'); | 133 testSelectorRoundTrip(':-webkit-any(.class1.class2.class3)'); |
134 testSelectorRoundTrip(':-webkit-any(.class1:hover)'); | 134 testSelectorRoundTrip(':-webkit-any(.class1:hover)'); |
135 testSelectorRoundTrip(':-webkit-any(a.class1.class2.class3:hover)'); | 135 testSelectorRoundTrip(':-webkit-any(a.class1.class2.class3:hover)'); |
136 | 136 |
137 debug(''); | 137 debug(''); |
138 | 138 |
139 shouldBe("parseThenSerializeRule('*:active { }')", "':active { }'"); | 139 shouldBe("parseThenSerializeRule('*:active { }')", "':active { }'"); |
140 shouldBe("parseThenSerializeRule('|a { }')", "'a { }'"); | 140 testSelectorRoundTrip("|a"); |
141 | 141 |
142 debug(''); | 142 debug(''); |
143 | 143 |
144 shouldBe("parseThenSerializeRule('input[type=file]:focus { }')", "'input[type=\"
file\"]:focus { }'"); | 144 shouldBe("parseThenSerializeRule('input[type=file]:focus { }')", "'input[type=\"
file\"]:focus { }'"); |
145 | 145 |
146 debug(''); | 146 debug(''); |
147 | 147 |
148 shouldBe("parseThenSerializeRule('a+b { }')", "'a + b { }'"); | 148 shouldBe("parseThenSerializeRule('a+b { }')", "'a + b { }'"); |
149 shouldBe("parseThenSerializeRule('a~b { }')", "'a ~ b { }'"); | 149 shouldBe("parseThenSerializeRule('a~b { }')", "'a ~ b { }'"); |
150 shouldBe("parseThenSerializeRule('a>b { }')", "'a > b { }'"); | 150 shouldBe("parseThenSerializeRule('a>b { }')", "'a > b { }'"); |
151 | 151 |
152 debug(''); | 152 debug(''); |
153 | 153 |
154 shouldBe("parseThenSerializeRule(':after { }')", "'::after { }'"); | 154 shouldBe("parseThenSerializeRule(':after { }')", "'::after { }'"); |
155 shouldBe("parseThenSerializeRule(':before { }')", "'::before { }'"); | 155 shouldBe("parseThenSerializeRule(':before { }')", "'::before { }'"); |
156 shouldBe("parseThenSerializeRule(':first-letter { }')", "'::first-letter { }'"); | 156 shouldBe("parseThenSerializeRule(':first-letter { }')", "'::first-letter { }'"); |
157 shouldBe("parseThenSerializeRule(':first-line { }')", "'::first-line { }'"); | 157 shouldBe("parseThenSerializeRule(':first-line { }')", "'::first-line { }'"); |
158 shouldBe("parseThenSerializeRule(':-webkit-any( a.class1 , #id,[att
r] ) { }')","':-webkit-any(a.class1,#id,[attr]) { }'"); | 158 shouldBe("parseThenSerializeRule(':-webkit-any( a.class1 , #id,[att
r] ) { }')","':-webkit-any(a.class1,#id,[attr]) { }'"); |
159 | 159 |
160 debug(''); | 160 debug(''); |
161 | 161 |
162 </script> | 162 </script> |
163 </body> | 163 </body> |
164 </html> | 164 </html> |
OLD | NEW |