blob: dbc9bdc49edde1f0cf25e8f5900602aea932495d [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style type="text/css" media="screen">
.box {
position: absolute;
height: 100px;
width: 100px;
left: 0px;
background-color: blue;
}
.box.animating {
animation: move 1s linear;
left: 400px;
}
@keyframes move {
from {
}
to {
left: 500px;
}
}
#result {
margin-top: 130px;
}
</style>
<script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
if (window.testRunner)
testRunner.waitUntilDone();
const expectedValues = [
// [time, element-id, property, expected-value, tolerance]
[0.5, "test", "left", 450, 0],
];
function setupTest()
{
test.offsetTop; // force style recalc
test.className = 'animating box';
runAnimationTest(expectedValues);
}
window.addEventListener('load', setupTest, false);
</script>
</head>
<body>
<p>Box should animate from left of 400px to 500px.</p>
<div id="test" class="box"></div>
<div id="result"></div>
</body>
</html>