8 border:
1px solid black;
13 font:
24px 'Lucida Grande';
15 border:
1em solid black;
64 /* margin-right/margin-bottom omitted */
74 var resolvedValueStyles
= [
96 document
.getElementById('console').appendChild(document
.createTextNode(msg
+ '\n'));
100 var div
= document
.getElementById(id
),
101 prop
, displayValue
, style
, computedStyle
;
103 for (var i
= 0; i
< displayValues
.length
; i
++) {
104 div
.style
.display
= displayValue
= displayValues
[i
];
105 computedStyle
= window
.getComputedStyle(div
, null);
106 log('Resolved values for element "' + id
+ '" with display "' + displayValue
+ '":');
108 for (var j
= 0; j
< resolvedValueStyles
.length
; j
++) {
109 style
= resolvedValueStyles
[j
];
110 log(style
+ ': ' + computedStyle
.getPropertyValue(style
));
114 div
.style
.display
= '';
118 function runTests() {
119 if (window
.testRunner
)
120 testRunner
.dumpAsText();
131 <body onload=
"runTests();">
133 Test calling getPropertyValue on computed styles that return
"resolved" values.
<br />
134 See
<a href=
"http://dev.w3.org/csswg/cssom/#resolved-values">http://dev.w3.org/csswg/cssom/#resolved-values
</a> for more information.
136 <pre id=
"console"></pre>
139 <div class=
"testbox" id=
"fixed">Fixed
</div>
142 <div class=
"testbox" id=
"percents">Percents
</div>
145 <div class=
"testbox" id=
"ems">EMs
</div>
148 <div class=
"testbox" id=
"auto">Auto
</div>
151 <div class=
"testbox" id=
"mixed">Mixed
</div>