Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / counters / deep-before.html
blob756cbf7d3a248bb31b8bd1c67a3d5c6aa9be38db
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
2 <html>
3 <head>
4 <title>Counters in :before node that is hidden inside an anonymous block.</title>
5 <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content">
6 <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#content">
7 <meta name="flags" content="">
8 <meta name="assert" content="DumpRenderTree finds couner when anonymous
9 renderers intervene between the element and its :before descendant.">
10 <style type="text/css">
11 #div1:before {
12 content: counters(test, ".");
13 counter-reset: test;
15 #div1 {
16 border: 2px solid black;
18 </style>
19 <script src="../../../resources/js-test.js"></script>
20 <script type="text/javascript">
22 if (window.testRunner)
23 testRunner.dumpAsText();
25 function run()
27 if (!window.testRunner)
28 return;
29 shouldBe("window.internals.counterValue(document.getElementById('div1'))", "'0'");
31 debug('');
32 debug('TEST COMPLETE');
33 // Eliminate confusing messages (counter values won't be dumped by dumpAsText).
34 var viewElement = document.getElementById("testView");
35 viewElement.parentNode.removeChild(viewElement);
37 </script>
38 </head>
40 <body onload="run();">
41 <div id="testView">
42 <p>Test passes if there is a "0" in the box below.</p>
43 <div id="div1">
44 <div id="div2"></div>
45 </div>
46 </div>
47 <div id="console"></div>
48 </body>
49 </html>