Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / counters / counter-increment-inherit.htm
blob838091153ac9dde6fc32bb2442a23cc7782fa8dd
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <title>CSS Test: Counter-increment tests</title>
5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
6 <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters">
7 <script src="../../../resources/js-test.js"></script>
8 <script>
9 if (window.testRunner) {
10 testRunner.dumpAsText();
11 testRunner.waitUntilDone();
13 function run()
15 // Some extra WebKit testing for counter-increment inherit
16 shouldBe("window.internals.counterValue(document.getElementById('wrapper90'))", "'5'");
17 shouldBe("window.internals.counterValue(document.getElementById('test90'))", "'10'");
18 shouldBe("window.internals.counterValue(document.getElementById('test90a'))", "'15'");
19 shouldBe("window.internals.counterValue(document.getElementById('wrapper91'))", "'10'");
20 shouldBe("window.internals.counterValue(document.getElementById('test91'))", "'20'");
21 shouldBe("window.internals.counterValue(document.getElementById('test91a'))", "'30'");
22 if (window.testRunner)
23 testRunner.notifyDone();
25 </script>
26 <style type="text/css">
27 #wrapper90 /*test 90*/
29 counter-increment: ident90 5;
31 #wrapper90:before
33 content: counter(ident90);
35 #test90
37 counter-increment: inherit;
39 #test90:before
41 content: counter(ident90);
43 #test90a
45 counter-increment: inherit;
47 #test90a:before
49 content: counter(ident90);
52 #wrapper91 /*test 91*/
54 counter-increment: ident91 5 ident91 5;
56 #wrapper91:before
58 content: counter(ident91);
60 #test91
62 counter-increment: inherit;
64 #test91:before
66 content: counter(ident91);
68 #test91a
70 counter-increment: inherit;
72 #test91a:before
74 content: counter(ident91);
77 </style>
78 </head>
79 <body onload="setTimeout('run()', 0);">
80 <div id="wrapper90">
81 <div id="test90">
82 <div id="test90a"></div>
83 </div>
84 </div>
85 <div id="wrapper91">
86 <div id="test91">
87 <div id="test91a"></div>
88 </div>
89 </div>
90 </body>
91 </html>