blob: 8b50d175496963295779c93cf3567271c35cf8f1 [file] [log] [blame]
<html>
<head>
<script>
function log(msg)
{
var console = document.getElementById('console');
console.appendChild(document.createTextNode(msg + "\n"));
}
function test()
{
if (window.layoutTestController)
layoutTestController.dumpAsText();
var element = document.getElementById('nonPositionedDiv');
var compStyle = element.ownerDocument.defaultView.getComputedStyle(element, null);
log("Non-positioned Div:");
log(" Computed Style = " + compStyle.zIndex + " (Should be auto)");
log(" element.style.zIndex = " + element.style.zIndex + " (Should be 20)");
log("");
element = document.getElementById('positionedDiv');
compStyle = element.ownerDocument.defaultView.getComputedStyle(element, null);
log("Positioned Div:");
log(" Computed Style = " + compStyle.zIndex + " (Should be 20)");
log(" element.style.zIndex = " + element.style.zIndex + " (Should be 20)");
}
</script>
</head>
<body onload="test();">
<div style="z-index:20" id='nonPositionedDiv'></div>
<div style="z-index:20; position: absolute" id='positionedDiv'></div>
<pre id='console'></pre>
</body>
</html>