1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
3 <meta http-equiv=
"content-type" content=
"text/html; charset=UTF-8">
4 <link rel=
"reference" href=
"http://test.csswg.org/suites/css2.1/20101210/html4/before-after-display-types-001-ref.xht">
5 <title>CSS Test: generated content complex content for :before
6 pseudo-element.
</title>
7 <link rel=
"author" title=
"Carol Szabo" href=
"mailto:carol.szabo@nokia.com">
8 <link rel=
"author" title=
"Robert O'Callahan" href=
"mailto:robert@ocallahan.org">
9 <link rel=
"author" title=
"Mozilla Corporation" href=
"http://mozilla.com/">
10 <link rel=
"help" href=
"http://www.w3.org/TR/CSS21/generate.html#before-after-content">
11 <meta name=
"flags" content=
"">
12 <style type=
"text/css">
13 #test { counter-reset:ctr
; quotes:"\0022" "\0022" "\0022" "\0022"}
16 content:counter
(ctr
) url
(support
/square-outline-32x32
.png
) open-quote
"Before-" attr
(class
);
17 counter-increment:ctr
;
20 content:counter
(ctr
) url
(support
/square-outline-32x32
.png
) "After-" attr
(class
) close-quote
;
21 counter-increment:ctr
;
23 .table:before, .table:after { display:table
; }
24 div
{ border:1px solid green
; margin:5px; }
26 <script type=
"text/javascript">
27 if (window
.testRunner
) {
28 testRunner
.dumpAsText();
29 testRunner
.waitUntilDone();
33 console
= document
.getElementById("console");
34 console
.innerText
= console
.innerText
+ text
+ "\n";
37 function compareProperty(testStyle
, referenceStyle
, propertyName
) {
38 testValue
= testStyle
.getPropertyValue(propertyName
);
39 referenceValue
= referenceStyle
.getPropertyValue(propertyName
);
40 if (testValue
== referenceValue
)
41 log(propertyName
+ ": PASSED");
43 log(propertyName
+ ": FAILED: testValue=" + testValue
+"; expected " + referenceValue
);
47 if (window
.testRunner
)
48 document
.getElementById("onlyInBrowser").setAttribute("style", "display: none;");
49 testStyle
= window
.getComputedStyle(document
.getElementById("testContainer"), null);
50 referenceStyle
= window
.getComputedStyle(document
.getElementById("reference"), null);
51 compareProperty(testStyle
, referenceStyle
, "width")
52 compareProperty(testStyle
, referenceStyle
, "height")
53 if (window
.testRunner
)
54 testRunner
.notifyDone();
57 </head><body onload=
"setTimeout('run()', 0);">
58 <p id=
"onlyInBrowser">The texts between the markers should be identical.
</p>
59 <p>========Marker1========
</p>
62 <td id=
"testContainer"><div id=
"test" class=
"table">Inner
</div></td>
66 <p>========Marker2========
</p>
69 <td id=
"reference"><div><span style=
"display: table;">1<img
70 src=
"support/square-outline-32x32.png"/>"Before-table</span>Inner<span
71 style="display: table
">2<img
72 src="support/square-outline-
32x32.png
"/>After-table"</span></div></td>
76 <p>========Marker3========
</p>
78 </td><td valign=
"top">