| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <style> | 3 <style> |
| 4 body { | 4 body { |
| 5 counter-reset: section; | 5 counter-reset: section; |
| 6 } | 6 } |
| 7 h1 { | 7 h1 { |
| 8 counter-increment: section; | 8 counter-increment: section; |
| 9 } | 9 } |
| 10 h2:before { | 10 h2:before { |
| 11 content: counter(section); | 11 content: counter(section); |
| 12 } | 12 } |
| 13 h2:after { | 13 h2:after { |
| 14 content: counters(section, ":", decimal); | 14 content: counters(section, ":", decimal); |
| 15 } | 15 } |
| 16 h3:before { | 16 h3:before { |
| 17 content: counter(section, lower-roman); | 17 content: counter(section, lower-roman); |
| 18 } | 18 } |
| 19 h3:after { | 19 h3:after { |
| 20 content: counters(section, ",", upper-roman); | 20 content: counters(section, ",", upper-roman); |
| 21 } | 21 } |
| 22 h4:before { | 22 h4:before { |
| 23 content: counter(section, none); | 23 content: counter(section, none); |
| 24 } | 24 } |
| 25 </style> | 25 </style> |
| 26 <script src="../../js/resources/js-test-pre.js"></script> | 26 <script src="../../../resources/js-test.js"></script> |
| 27 </head> | 27 </head> |
| 28 <body> | 28 <body> |
| 29 <script> | 29 <script> |
| 30 description("Test the cssText output of counter-valued CSSPrimitiveValues"); | 30 description("Test the cssText output of counter-valued CSSPrimitiveValues"); |
| 31 var rules = document.styleSheets[0].cssRules; | 31 var rules = document.styleSheets[0].cssRules; |
| 32 shouldBeEqualToString("rules[2].style.cssText", "content: counter(section, decim
al);"); | 32 shouldBeEqualToString("rules[2].style.cssText", "content: counter(section, decim
al);"); |
| 33 shouldBeEqualToString("rules[3].style.cssText", "content: counters(section, ':',
decimal);"); | 33 shouldBeEqualToString("rules[3].style.cssText", "content: counters(section, ':',
decimal);"); |
| 34 shouldBeEqualToString("rules[4].style.cssText", "content: counter(section, lower
-roman);"); | 34 shouldBeEqualToString("rules[4].style.cssText", "content: counter(section, lower
-roman);"); |
| 35 shouldBeEqualToString("rules[5].style.cssText", "content: counters(section, ',',
upper-roman);"); | 35 shouldBeEqualToString("rules[5].style.cssText", "content: counters(section, ',',
upper-roman);"); |
| 36 shouldBeEqualToString("rules[6].style.cssText", "content: counter(section, none)
;"); | 36 shouldBeEqualToString("rules[6].style.cssText", "content: counter(section, none)
;"); |
| 37 </script> | 37 </script> |
| 38 </body> | 38 </body> |
| 39 </html> | 39 </html> |
| OLD | NEW |