blob: 9c961e05ec640f88a68712de3c86d2b1a0274ed7 [file] [log] [blame]
<!DOCTYPE html>
#container {
position: relative;
width: 400px;
height: 100px;
border: 1px solid black;
.box {
position: absolute;
width: 100px;
height: 100px;
background-color: green;
.indicator {
left: 0;
top: 0;
background-color: red;
#container.moved .hardware {
animation: move 300ms linear;
@keyframes move {
from { left: 0; }
to { left: 300px; }
<script type="text/javascript">
function testEnded()
if (window.testRunner)
function startTest()
if (window.testRunner)
document.getElementById('tester').addEventListener('animationend', testEnded, false);
document.getElementById('container').offsetTop; // Force style recalc
document.getElementById('container').className = 'moved';
window.addEventListener('load', startTest, false);
<p>At the end of the test the green box should obscure the red box.</p>
<div id="container">
<div class="indicator box"></div>
<div id="tester" class="hardware box"></div>
<div id="result"></div>