<html>
<body>
<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=37900">bug 37900</a>:
cloneNode() does not preserve z-index with more than six digit</p>
<div style="position:absolute; top: 80px">
<div id="layer" style="position:absolute; left:10px; top:10px; width:100px; height:100px; border:solid 1px red; background:#fff0f0; z-index:20002000">
</div>
<div style="position:absolute; left:25px; top:30px; width:100px; height:100px; border: solid 1px #006600; background:#f0fff0; z-index:1000">
</div>
</div>
<div id="msgs">
</div>
</body>
<script language="javascript">
var lc = window.testRunner;
if (lc) {
lc.dumpAsText();
}
var oldEl = document.getElementById('layer');
layer.style.left = '50px';
var newEl = oldEl.cloneNode(true);
var container = oldEl.parentNode;
container.removeChild(oldEl);
container.appendChild(newEl);
var msgs = [];
msgs.push(newEl.style.zIndex == 20002000 ? "PASS" : "FAIL");
document.getElementById('msgs').innerHTML = msgs.join('<br/>');
</script>
</html>