blob: f8e7cb4dcb7779d969da8adf89002e193c57c0ee [file] [log] [blame]
<!DOCTYPE html><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] -->
<html>
<head>
<style>
#box {
height: 100px;
width: 100px;
background-color: blue;
-webkit-transform: translateX(0px);
-webkit-transition-duration: 1s;
-webkit-transition-timing-function: frames(5);
-webkit-transition-property: -webkit-transform;
}
</style>
<script src="resources/transition-test-helpers.js"></script>
<script type="text/javascript">
const expectedValues = [
// [time, element-id, property, expected-value, tolerance]
[0.25, "box", "-webkit-transform.4", 50, 5],
[0.5, "box", "-webkit-transform.4", 100, 5],
[0.75, "box", "-webkit-transform.4", 150, 5],
];
function setupTest()
{
var box = document.getElementById('box');
box.style.webkitTransform = 'translateX(200px)';
}
runTransitionTest(expectedValues, setupTest, usePauseAPI);
</script>
</head>
<body>
<p>
The box should move horizontally 200px over 1s, in 4 equal increments.
</p>
<div id="box">
</div>
<div id="result">
</div>
</body>
</html>