| 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 26 matching lines...) Expand all Loading... |
| 37 testSelectorRoundTrip('[a]'); | 37 testSelectorRoundTrip('[a]'); |
| 38 testSelectorRoundTrip('[a="b"]'); | 38 testSelectorRoundTrip('[a="b"]'); |
| 39 testSelectorRoundTrip('[a~="b"]'); | 39 testSelectorRoundTrip('[a~="b"]'); |
| 40 testSelectorRoundTrip('[a|="b"]'); | 40 testSelectorRoundTrip('[a|="b"]'); |
| 41 testSelectorRoundTrip('[a^="b"]'); | 41 testSelectorRoundTrip('[a^="b"]'); |
| 42 testSelectorRoundTrip('[a$="b"]'); | 42 testSelectorRoundTrip('[a$="b"]'); |
| 43 testSelectorRoundTrip('[a*="b"]'); | 43 testSelectorRoundTrip('[a*="b"]'); |
| 44 | 44 |
| 45 debug(''); | 45 debug(''); |
| 46 | 46 |
| 47 testSelectorRoundTrip('*|a'); | 47 shouldBe("parseThenSerializeRule('*|a { }')", "'a { }'"); |
| 48 testSelectorRoundTrip('n|a'); | 48 testSelectorRoundTrip('n|a'); |
| 49 testSelectorRoundTrip('*|*'); | 49 shouldBe("parseThenSerializeRule('*|* { }')", "'* { }'"); |
| 50 testSelectorRoundTrip('n|*'); | 50 testSelectorRoundTrip('n|*'); |
| 51 testSelectorRoundTrip('[*|a]'); | 51 testSelectorRoundTrip('[*|a]'); |
| 52 testSelectorRoundTrip('[n|a]'); | 52 testSelectorRoundTrip('[n|a]'); |
| 53 | 53 |
| 54 debug(''); | 54 debug(''); |
| 55 | 55 |
| 56 testSelectorRoundTrip('a:active'); | 56 testSelectorRoundTrip('a:active'); |
| 57 testSelectorRoundTrip('a b'); | 57 testSelectorRoundTrip('a b'); |
| 58 testSelectorRoundTrip('a + b'); | 58 testSelectorRoundTrip('a + b'); |
| 59 testSelectorRoundTrip('a ~ b'); | 59 testSelectorRoundTrip('a ~ b'); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 shouldBe("parseThenSerializeRule(':before { }')", "'::before { }'"); | 158 shouldBe("parseThenSerializeRule(':before { }')", "'::before { }'"); |
| 159 shouldBe("parseThenSerializeRule(':first-letter { }')", "'::first-letter { }'"); | 159 shouldBe("parseThenSerializeRule(':first-letter { }')", "'::first-letter { }'"); |
| 160 shouldBe("parseThenSerializeRule(':first-line { }')", "'::first-line { }'"); | 160 shouldBe("parseThenSerializeRule(':first-line { }')", "'::first-line { }'"); |
| 161 shouldBe("parseThenSerializeRule(':-webkit-any( a.class1 , #id,[att
r] ) { }')","':-webkit-any(a.class1,#id,[attr]) { }'"); | 161 shouldBe("parseThenSerializeRule(':-webkit-any( a.class1 , #id,[att
r] ) { }')","':-webkit-any(a.class1,#id,[attr]) { }'"); |
| 162 | 162 |
| 163 debug(''); | 163 debug(''); |
| 164 | 164 |
| 165 </script> | 165 </script> |
| 166 </body> | 166 </body> |
| 167 </html> | 167 </html> |
| OLD | NEW |