| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 debug(''); | 62 debug(''); |
| 63 | 63 |
| 64 testSelectorRoundTrip(":active"); | 64 testSelectorRoundTrip(":active"); |
| 65 testSelectorRoundTrip(":checked"); | 65 testSelectorRoundTrip(":checked"); |
| 66 testSelectorRoundTrip(":disabled"); | 66 testSelectorRoundTrip(":disabled"); |
| 67 testSelectorRoundTrip(":empty"); | 67 testSelectorRoundTrip(":empty"); |
| 68 testSelectorRoundTrip(":enabled"); | 68 testSelectorRoundTrip(":enabled"); |
| 69 testSelectorRoundTrip(":first-child"); | 69 testSelectorRoundTrip(":first-child"); |
| 70 testSelectorRoundTrip(":first-of-type"); | 70 testSelectorRoundTrip(":first-of-type"); |
| 71 testSelectorRoundTrip(":focus"); | 71 testSelectorRoundTrip(":focus"); |
| 72 testSelectorRoundTrip(":focus-within"); |
| 72 testSelectorRoundTrip(":hover"); | 73 testSelectorRoundTrip(":hover"); |
| 73 testSelectorRoundTrip(":indeterminate"); | 74 testSelectorRoundTrip(":indeterminate"); |
| 74 testSelectorRoundTrip(":link"); | 75 testSelectorRoundTrip(":link"); |
| 75 testSelectorRoundTrip(":not(:placeholder-shown)"); | 76 testSelectorRoundTrip(":not(:placeholder-shown)"); |
| 76 testSelectorRoundTrip(":placeholder-shown"); | 77 testSelectorRoundTrip(":placeholder-shown"); |
| 77 testSelectorRoundTrip(":root"); | 78 testSelectorRoundTrip(":root"); |
| 78 testSelectorRoundTrip(":target"); | 79 testSelectorRoundTrip(":target"); |
| 79 testSelectorRoundTrip(":visited"); | 80 testSelectorRoundTrip(":visited"); |
| 80 | 81 |
| 81 debug(''); | 82 debug(''); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 debug(''); | 123 debug(''); |
| 123 | 124 |
| 124 testSelectorRoundTrip("a[b]::-webkit-slider-thumb"); | 125 testSelectorRoundTrip("a[b]::-webkit-slider-thumb"); |
| 125 testSelectorRoundTrip("a.b::-webkit-slider-thumb"); | 126 testSelectorRoundTrip("a.b::-webkit-slider-thumb"); |
| 126 testSelectorRoundTrip("a#b::-webkit-slider-thumb"); | 127 testSelectorRoundTrip("a#b::-webkit-slider-thumb"); |
| 127 testSelectorRoundTrip("a[b].c#d::-webkit-slider-thumb"); | 128 testSelectorRoundTrip("a[b].c#d::-webkit-slider-thumb"); |
| 128 | 129 |
| 129 debug(''); | 130 debug(''); |
| 130 | 131 |
| 131 testSelectorRoundTrip('input:not([type="file"]):focus'); | 132 testSelectorRoundTrip('input:not([type="file"]):focus'); |
| 133 testSelectorRoundTrip('input:not([type="file"]):focus-within'); |
| 132 testSelectorRoundTrip(':-webkit-any([type="file"])'); | 134 testSelectorRoundTrip(':-webkit-any([type="file"])'); |
| 133 testSelectorRoundTrip(':-webkit-any(:hover)'); | 135 testSelectorRoundTrip(':-webkit-any(:hover)'); |
| 134 testSelectorRoundTrip('input:-webkit-any([type="file"],:hover,:focus):enabled'); | 136 testSelectorRoundTrip('input:-webkit-any([type="file"],:hover,:focus):enabled'); |
| 135 testSelectorRoundTrip(':-webkit-any(input[type="file"],a:hover,button:focus)'); | 137 testSelectorRoundTrip(':-webkit-any(input[type="file"],a:hover,button:focus)'); |
| 136 testSelectorRoundTrip(':-webkit-any(.class1.class2.class3)'); | 138 testSelectorRoundTrip(':-webkit-any(.class1.class2.class3)'); |
| 137 testSelectorRoundTrip(':-webkit-any(.class1:hover)'); | 139 testSelectorRoundTrip(':-webkit-any(.class1:hover)'); |
| 138 testSelectorRoundTrip(':-webkit-any(a.class1.class2.class3:hover)'); | 140 testSelectorRoundTrip(':-webkit-any(a.class1.class2.class3:hover)'); |
| 139 | 141 |
| 140 debug(''); | 142 debug(''); |
| 141 | 143 |
| 142 shouldBe("parseThenSerializeRule('*:active { }')", "':active { }'"); | 144 shouldBe("parseThenSerializeRule('*:active { }')", "':active { }'"); |
| 143 testSelectorRoundTrip("|a"); | 145 testSelectorRoundTrip("|a"); |
| 144 | 146 |
| 145 debug(''); | 147 debug(''); |
| 146 | 148 |
| 147 shouldBe("parseThenSerializeRule('input[type=file]:focus { }')", "'input[type=\"
file\"]:focus { }'"); | 149 shouldBe("parseThenSerializeRule('input[type=file]:focus { }')", "'input[type=\"
file\"]:focus { }'"); |
| 150 shouldBe("parseThenSerializeRule('input[type=file]:focus-within { }')", "'input[
type=\"file\"]:focus-within { }'"); |
| 148 | 151 |
| 149 debug(''); | 152 debug(''); |
| 150 | 153 |
| 151 shouldBe("parseThenSerializeRule('a+b { }')", "'a + b { }'"); | 154 shouldBe("parseThenSerializeRule('a+b { }')", "'a + b { }'"); |
| 152 shouldBe("parseThenSerializeRule('a~b { }')", "'a ~ b { }'"); | 155 shouldBe("parseThenSerializeRule('a~b { }')", "'a ~ b { }'"); |
| 153 shouldBe("parseThenSerializeRule('a>b { }')", "'a > b { }'"); | 156 shouldBe("parseThenSerializeRule('a>b { }')", "'a > b { }'"); |
| 154 | 157 |
| 155 debug(''); | 158 debug(''); |
| 156 | 159 |
| 157 shouldBe("parseThenSerializeRule(':after { }')", "'::after { }'"); | 160 shouldBe("parseThenSerializeRule(':after { }')", "'::after { }'"); |
| 158 shouldBe("parseThenSerializeRule(':before { }')", "'::before { }'"); | 161 shouldBe("parseThenSerializeRule(':before { }')", "'::before { }'"); |
| 159 shouldBe("parseThenSerializeRule(':first-letter { }')", "'::first-letter { }'"); | 162 shouldBe("parseThenSerializeRule(':first-letter { }')", "'::first-letter { }'"); |
| 160 shouldBe("parseThenSerializeRule(':first-line { }')", "'::first-line { }'"); | 163 shouldBe("parseThenSerializeRule(':first-line { }')", "'::first-line { }'"); |
| 161 shouldBe("parseThenSerializeRule(':-webkit-any( a.class1 , #id,[att
r] ) { }')","':-webkit-any(a.class1,#id,[attr]) { }'"); | 164 shouldBe("parseThenSerializeRule(':-webkit-any( a.class1 , #id,[att
r] ) { }')","':-webkit-any(a.class1,#id,[attr]) { }'"); |
| 162 | 165 |
| 163 debug(''); | 166 debug(''); |
| 164 | 167 |
| 165 </script> | 168 </script> |
| 166 </body> | 169 </body> |
| 167 </html> | 170 </html> |
| OLD | NEW |