OLD | NEW |
1 <html> | 1 <html> |
2 <head id="head"> | 2 <head id="head"> |
3 <script src="../js/resources/js-test-pre.js"></script> | 3 <script src="../js/resources/js-test-pre.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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 testSelectorRoundTrip("::selection"); | 90 testSelectorRoundTrip("::selection"); |
91 | 91 |
92 debug(''); | 92 debug(''); |
93 | 93 |
94 testSelectorRoundTrip(":-webkit-any-link"); | 94 testSelectorRoundTrip(":-webkit-any-link"); |
95 testSelectorRoundTrip(":-webkit-autofill"); | 95 testSelectorRoundTrip(":-webkit-autofill"); |
96 testSelectorRoundTrip(":-webkit-drag"); | 96 testSelectorRoundTrip(":-webkit-drag"); |
97 | 97 |
98 debug(''); | 98 debug(''); |
99 | 99 |
100 testSelectorRoundTrip("::-webkit-file-upload-button"); | 100 shouldBe("parseThenSerializeRule('::-webkit-file-upload-button { }')", "'*::-web
kit-file-upload-button { }'"); |
101 testSelectorRoundTrip("::-webkit-search-cancel-button"); | 101 shouldBe("parseThenSerializeRule('::-webkit-search-cancel-button { }')", "'*::-w
ebkit-search-cancel-button { }'"); |
102 testSelectorRoundTrip("::-webkit-search-decoration"); | 102 shouldBe("parseThenSerializeRule('::-webkit-search-decoration { }')", "'*::-webk
it-search-decoration { }'"); |
103 testSelectorRoundTrip("::-webkit-search-results-button"); | 103 shouldBe("parseThenSerializeRule('::-webkit-search-results-button { }')", "'*::-
webkit-search-results-button { }'"); |
104 testSelectorRoundTrip("::-webkit-search-results-decoration"); | 104 shouldBe("parseThenSerializeRule('::-webkit-search-results-decoration { }')", "'
*::-webkit-search-results-decoration { }'"); |
105 testSelectorRoundTrip("::-webkit-slider-thumb"); | 105 shouldBe("parseThenSerializeRule('::-webkit-slider-thumb { }')", "'*::-webkit-sl
ider-thumb { }'"); |
106 | 106 |
107 debug(''); | 107 debug(''); |
108 | 108 |
109 testSelectorRoundTrip("a::-webkit-slider-thumb"); | 109 testSelectorRoundTrip("a::-webkit-slider-thumb"); |
110 testSelectorRoundTrip("a ::-webkit-slider-thumb"); | 110 shouldBe("parseThenSerializeRule('a ::-webkit-slider-thumb { }')", "'a *::-webki
t-slider-thumb { }'"); |
111 testSelectorRoundTrip("[a]::-webkit-slider-thumb"); | 111 testSelectorRoundTrip("[a]::-webkit-slider-thumb"); |
112 testSelectorRoundTrip("[a] ::-webkit-slider-thumb"); | 112 shouldBe("parseThenSerializeRule('[a] ::-webkit-slider-thumb { }')", "'[a] *::-w
ebkit-slider-thumb { }'"); |
113 testSelectorRoundTrip(".a::-webkit-slider-thumb"); | 113 testSelectorRoundTrip(".a::-webkit-slider-thumb"); |
114 testSelectorRoundTrip(".a ::-webkit-slider-thumb"); | 114 shouldBe("parseThenSerializeRule('.a ::-webkit-slider-thumb { }')", "'.a *::-web
kit-slider-thumb { }'"); |
115 testSelectorRoundTrip("#a::-webkit-slider-thumb"); | 115 testSelectorRoundTrip("#a::-webkit-slider-thumb"); |
116 testSelectorRoundTrip("#a ::-webkit-slider-thumb"); | 116 shouldBe("parseThenSerializeRule('#a ::-webkit-slider-thumb { }')", "'#a *::-web
kit-slider-thumb { }'"); |
| 117 shouldBe("parseThenSerializeRule('* ::-webkit-slider-thumb { }')", "'* *::-webki
t-slider-thumb { }'"); |
| 118 |
| 119 debug(''); |
| 120 |
| 121 testSelectorRoundTrip("a[b]::-webkit-slider-thumb"); |
| 122 testSelectorRoundTrip("a.b::-webkit-slider-thumb"); |
| 123 testSelectorRoundTrip("a#b::-webkit-slider-thumb"); |
| 124 testSelectorRoundTrip("a[b].c#d::-webkit-slider-thumb"); |
117 | 125 |
118 debug(''); | 126 debug(''); |
119 | 127 |
120 testSelectorRoundTrip('input:not([type="file"]):focus'); | 128 testSelectorRoundTrip('input:not([type="file"]):focus'); |
121 testSelectorRoundTrip(':-webkit-any([type="file"])'); | 129 testSelectorRoundTrip(':-webkit-any([type="file"])'); |
122 testSelectorRoundTrip(':-webkit-any(:hover)'); | 130 testSelectorRoundTrip(':-webkit-any(:hover)'); |
123 testSelectorRoundTrip('input:-webkit-any([type="file"],:hover,:focus):enabled'); | 131 testSelectorRoundTrip('input:-webkit-any([type="file"],:hover,:focus):enabled'); |
124 testSelectorRoundTrip(':-webkit-any(input[type="file"],a:hover,button:focus)'); | 132 testSelectorRoundTrip(':-webkit-any(input[type="file"],a:hover,button:focus)'); |
125 testSelectorRoundTrip(':-webkit-any(.class1.class2.class3)'); | 133 testSelectorRoundTrip(':-webkit-any(.class1.class2.class3)'); |
126 testSelectorRoundTrip(':-webkit-any(.class1:hover)'); | 134 testSelectorRoundTrip(':-webkit-any(.class1:hover)'); |
(...skipping 21 matching lines...) Expand all Loading... |
148 shouldBe("parseThenSerializeRule(':first-letter { }')", "'::first-letter { }'"); | 156 shouldBe("parseThenSerializeRule(':first-letter { }')", "'::first-letter { }'"); |
149 shouldBe("parseThenSerializeRule(':first-line { }')", "'::first-line { }'"); | 157 shouldBe("parseThenSerializeRule(':first-line { }')", "'::first-line { }'"); |
150 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]) { }'"); |
151 | 159 |
152 debug(''); | 160 debug(''); |
153 | 161 |
154 </script> | 162 </script> |
155 <script src="../js/resources/js-test-post.js"></script> | 163 <script src="../js/resources/js-test-post.js"></script> |
156 </body> | 164 </body> |
157 </html> | 165 </html> |
OLD | NEW |