<html>
<head>
<style type="text/css" media="screen">
.container {
height: 200px;
width: 200px;
background-color: green;
transform: translateZ(0);
}
#tester {
position: absolute;
top: 50px;
left: 50px;
height: 100px;
width: 100px;
background-color: blue;
}
</style>
<script src="../../../resources/run-after-layout-and-paint.js"></script>
<script type="text/javascript" charset="utf-8">
function doTest() {
runAfterLayoutAndPaint(changeBackground1);
}
function changeBackground1() {
document.getElementById('tester').style.backgroundColor = 'red';
runAfterLayoutAndPaint(changeBackground2);
}
function changeBackground2() {
document.getElementById('tester').style.backgroundColor = 'green';
if (window.testRunner)
testRunner.notifyDone();
}
if (window.testRunner)
testRunner.waitUntilDone();
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<!-- this test should only display a green square -->
<div class="container">
<div id="tester"></div>
</div>
</body>
</html>