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 setting and re-serialization of some CSS selectors."); | 8 description("This tests setting and re-serialization of some CSS selectors."); |
9 | 9 |
10 var bogusSelector = "_foo"; | 10 var bogusSelector = "_foo"; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 debug(''); | 81 debug(''); |
82 | 82 |
83 testSelectorRoundTrip(":active"); | 83 testSelectorRoundTrip(":active"); |
84 testSelectorRoundTrip(":checked"); | 84 testSelectorRoundTrip(":checked"); |
85 testSelectorRoundTrip(":disabled"); | 85 testSelectorRoundTrip(":disabled"); |
86 testSelectorRoundTrip(":empty"); | 86 testSelectorRoundTrip(":empty"); |
87 testSelectorRoundTrip(":enabled"); | 87 testSelectorRoundTrip(":enabled"); |
88 testSelectorRoundTrip(":first-child"); | 88 testSelectorRoundTrip(":first-child"); |
89 testSelectorRoundTrip(":first-of-type"); | 89 testSelectorRoundTrip(":first-of-type"); |
90 testSelectorRoundTrip(":focus"); | 90 testSelectorRoundTrip(":focus"); |
| 91 testSelectorRoundTrip(":focus-within"); |
91 testSelectorRoundTrip(":hover"); | 92 testSelectorRoundTrip(":hover"); |
92 testSelectorRoundTrip(":indeterminate"); | 93 testSelectorRoundTrip(":indeterminate"); |
93 testSelectorRoundTrip(":link"); | 94 testSelectorRoundTrip(":link"); |
94 testSelectorRoundTrip(":not(:placeholder-shown)"); | 95 testSelectorRoundTrip(":not(:placeholder-shown)"); |
95 testSelectorRoundTrip(":placeholder-shown"); | 96 testSelectorRoundTrip(":placeholder-shown"); |
96 testSelectorRoundTrip(":root"); | 97 testSelectorRoundTrip(":root"); |
97 testSelectorRoundTrip(":target"); | 98 testSelectorRoundTrip(":target"); |
98 testSelectorRoundTrip(":visited"); | 99 testSelectorRoundTrip(":visited"); |
99 | 100 |
100 debug(''); | 101 debug(''); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 debug(''); | 142 debug(''); |
142 | 143 |
143 testSelectorRoundTrip("a[b]::-webkit-slider-thumb"); | 144 testSelectorRoundTrip("a[b]::-webkit-slider-thumb"); |
144 testSelectorRoundTrip("a.b::-webkit-slider-thumb"); | 145 testSelectorRoundTrip("a.b::-webkit-slider-thumb"); |
145 testSelectorRoundTrip("a#b::-webkit-slider-thumb"); | 146 testSelectorRoundTrip("a#b::-webkit-slider-thumb"); |
146 testSelectorRoundTrip("a[b].c#d::-webkit-slider-thumb"); | 147 testSelectorRoundTrip("a[b].c#d::-webkit-slider-thumb"); |
147 | 148 |
148 debug(''); | 149 debug(''); |
149 | 150 |
150 testSelectorRoundTrip('input:not([type="file"]):focus'); | 151 testSelectorRoundTrip('input:not([type="file"]):focus'); |
| 152 testSelectorRoundTrip('input:not([type="file"]):focus-within'); |
151 testSelectorRoundTrip(':-webkit-any([type="file"])'); | 153 testSelectorRoundTrip(':-webkit-any([type="file"])'); |
152 testSelectorRoundTrip(':-webkit-any(:hover)'); | 154 testSelectorRoundTrip(':-webkit-any(:hover)'); |
153 testSelectorRoundTrip('input:-webkit-any([type="file"],:hover,:focus):enabled'); | 155 testSelectorRoundTrip('input:-webkit-any([type="file"],:hover,:focus):enabled'); |
154 testSelectorRoundTrip(':-webkit-any(input[type="file"],a:hover,button:focus)'); | 156 testSelectorRoundTrip(':-webkit-any(input[type="file"],a:hover,button:focus)'); |
155 testSelectorRoundTrip(':-webkit-any(.class1.class2.class3)'); | 157 testSelectorRoundTrip(':-webkit-any(.class1.class2.class3)'); |
156 testSelectorRoundTrip(':-webkit-any(.class1:hover)'); | 158 testSelectorRoundTrip(':-webkit-any(.class1:hover)'); |
157 testSelectorRoundTrip(':-webkit-any(a.class1.class2.class3:hover)'); | 159 testSelectorRoundTrip(':-webkit-any(a.class1.class2.class3:hover)'); |
158 | 160 |
159 debug(''); | 161 debug(''); |
160 | 162 |
161 shouldBe("setThenReadSelectorText('*:active')", "':active'"); | 163 shouldBe("setThenReadSelectorText('*:active')", "':active'"); |
162 testSelectorRoundTrip("|a"); | 164 testSelectorRoundTrip("|a"); |
163 | 165 |
164 debug(''); | 166 debug(''); |
165 | 167 |
166 shouldBe("setThenReadSelectorText('input[type=file]:focus')", "'input[type=\"fil
e\"]:focus'"); | 168 shouldBe("setThenReadSelectorText('input[type=file]:focus')", "'input[type=\"fil
e\"]:focus'"); |
| 169 shouldBe("setThenReadSelectorText('input[type=file]:focus-within')", "'input[typ
e=\"file\"]:focus-within'"); |
167 | 170 |
168 debug(''); | 171 debug(''); |
169 | 172 |
170 shouldBe("setThenReadSelectorText('a+b')", "'a + b'"); | 173 shouldBe("setThenReadSelectorText('a+b')", "'a + b'"); |
171 shouldBe("setThenReadSelectorText('a~b')", "'a ~ b'"); | 174 shouldBe("setThenReadSelectorText('a~b')", "'a ~ b'"); |
172 shouldBe("setThenReadSelectorText('a>b')", "'a > b'"); | 175 shouldBe("setThenReadSelectorText('a>b')", "'a > b'"); |
173 | 176 |
174 debug(''); | 177 debug(''); |
175 | 178 |
176 shouldBe("setThenReadSelectorText(':after')", "'::after'"); | 179 shouldBe("setThenReadSelectorText(':after')", "'::after'"); |
177 shouldBe("setThenReadSelectorText(':before')", "'::before'"); | 180 shouldBe("setThenReadSelectorText(':before')", "'::before'"); |
178 shouldBe("setThenReadSelectorText(':first-letter')", "'::first-letter'"); | 181 shouldBe("setThenReadSelectorText(':first-letter')", "'::first-letter'"); |
179 shouldBe("setThenReadSelectorText(':first-line')", "'::first-line'"); | 182 shouldBe("setThenReadSelectorText(':first-line')", "'::first-line'"); |
180 shouldBe("setThenReadSelectorText(':-webkit-any( a.class1 , #id,[att
r] )')","':-webkit-any(a.class1,#id,[attr])'"); | 183 shouldBe("setThenReadSelectorText(':-webkit-any( a.class1 , #id,[att
r] )')","':-webkit-any(a.class1,#id,[attr])'"); |
181 | 184 |
182 debug(''); | 185 debug(''); |
183 | 186 |
184 </script> | 187 </script> |
185 </body> | 188 </body> |
186 </html> | 189 </html> |
OLD | NEW |