blob: cc961c749d97037958d01b67950348ec7f8f6925 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
.box {
position: absolute;
width: 200px;
height: 200px;
background-color: red;
}
.composited {
transform: translateZ(1px);
}
.negative {
z-index: -1;
}
.positive {
z-index: 1;
background-color: green;
}
</style>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
window.addEventListener('load', () => {
requestAnimationFrame(() => {
document.getElementById('target').classList.add('negative');
if (window.testRunner)
testRunner.notifyDone();
});
}, false);
</script>
</head>
<body>
<p>You should see a green box below.</p>
<div class="composited box">
<div id="target" class="box"></div>
<div class="positive box"></div>
</div>
</body>
</html>