9 content: counter(section);
12 content: counter(section, decimal);
15 content: counters(section,
":");
18 content: counters(section,
":", decimal);
21 content: counter(section, lower-roman);
24 content: counters(section,
",", lower-roman);
27 content: counter(section, none);
30 content: counters(section,
":", none);
33 content:
"A" counter(section, upper-roman)
"B";
36 content:
"C" counters(section,
",", lower-roman)
"D";
40 <script src=
"../../../resources/testharness.js"></script>
41 <script src=
"../../../resources/testharnessreport.js"></script>
44 assert_equals(getComputedStyle(document
.querySelector('h1'), ':before').content
, 'counter(section)');
45 assert_equals(getComputedStyle(document
.querySelector('h1'), ':after').content
, 'counter(section)');
46 assert_equals(getComputedStyle(document
.querySelector('h2'), ':before').content
, 'counters(section, ":")');
47 assert_equals(getComputedStyle(document
.querySelector('h2'), ':after').content
, 'counters(section, ":")');
48 assert_equals(getComputedStyle(document
.querySelector('h3'), ':before').content
, 'counter(section, lower-roman)');
49 assert_equals(getComputedStyle(document
.querySelector('h3'), ':after').content
, 'counters(section, ",", lower-roman)');
50 assert_equals(getComputedStyle(document
.querySelector('h4'), ':before').content
, 'counter(section, none)');
51 assert_equals(getComputedStyle(document
.querySelector('h4'), ':after').content
, 'counters(section, ":", none)');
52 assert_equals(getComputedStyle(document
.querySelector('h5'), ':before').content
, '"A" counter(section, upper-roman) "B"');
53 assert_equals(getComputedStyle(document
.querySelector('h5'), ':after').content
, '"C" counters(section, ",", lower-roman) "D"');
54 }, "Check that the content property contains the correct value for counter()");