Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / counters / counter-content-property.html
blobac98b0bc7930eff0be1df3e39e46f22ca8051460
1 <!DOCTYPE html>
2 <h1></h1>
3 <h2></h2>
4 <h3></h3>
5 <h4></h4>
6 <h5></h5>
7 <style>
8 h1:before {
9 content: counter(section);
11 h1:after {
12 content: counter(section, decimal);
14 h2:before {
15 content: counters(section, ":");
17 h2:after {
18 content: counters(section, ":", decimal);
20 h3:before {
21 content: counter(section, lower-roman);
23 h3:after {
24 content: counters(section, ",", lower-roman);
26 h4:before {
27 content: counter(section, none);
29 h4:after {
30 content: counters(section, ":", none);
32 h5:before {
33 content: "A" counter(section, upper-roman) "B";
35 h5:after {
36 content: "C" counters(section, ",", lower-roman) "D";
38 </style>
40 <script src="../../../resources/testharness.js"></script>
41 <script src="../../../resources/testharnessreport.js"></script>
42 <script>
43 test(function () {
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()");
55 </script>