1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01//EN">
4 <title>WebKit's adaptation of http://test.csswg.org/suites/css2.1/
20110111/html4/content-
021.htm
</title>
5 <link rel=
"originalAuthor" title=
"Microsoft" href=
"http://www.microsoft.com/">
6 <link rel=
"help" href=
"http://www.w3.org/TR/CSS21/generate.html#propdef-content">
7 <link rel=
"help" href=
"http://www.w3.org/TR/CSS21/generate.html#content">
8 <meta name=
"flags" content=
"">
9 <meta name=
"assert" content=
"The 'content' property properly handles
10 counter autonesting when anonymous renderers intervene between the
11 element and its :before descendant.">
12 <style type=
"text/css">
13 #testView div:before
{
14 content: counters
(test
, ".");
18 border: 2px solid black
;
21 <script src=
"../../../resources/js-test.js"></script>
22 <script type=
"text/javascript">
24 if (window
.testRunner
)
25 testRunner
.dumpAsText();
29 if (!window
.testRunner
)
31 shouldBe("window.internals.counterValue(document.getElementById('div1'))", "'0'");
32 shouldBe("window.internals.counterValue(document.getElementById('div2'))", "'0.0'");
35 debug('TEST COMPLETE');
36 // Eliminate confusing messages (counter values won't be dumped by dumpAsText).
37 var viewElement
= document
.getElementById("testView");
38 viewElement
.parentNode
.removeChild(viewElement
);
43 <body onload=
"run();">
45 <p>This is the WebKit version of
<a href=
"http://test.csswg.org/suites/css2.1/20110111/html4/content-021.htm">CSS
46 Test: Content using a 'counters()' function with a string value
</a>.
</p>
48 <p>Test passes if there are the numbers
"0" and
"0.0" in the box below.
</p>
53 <div id=
"console"></div>