blob: 9117492b0bb3a12b81037ed229fc59e0b6ecfd99 [file] [log] [blame]
<!-- webkit-test-runner [ experimental:WebAnimationsCSSIntegrationEnabled=true ] -->
<html>
<head>
<style>
.box {
position: relative;
left: 0;
height: 100px;
width: 100px;
margin: 10px;
background-color: blue;
-webkit-transition: left 1s linear;
}
.animating > .box {
left: 400px;
}
</style>
<script src="resources/transition-test-helpers.js"></script>
<script>
const expectedValues = [
// [time, element-id, property, expected-value, tolerance]
[0.5, "box1", "left", 200, 4],
[0.5, "box2", "left", 322, 4],
[0.5, "box3", "left", 126, 4],
[0.5, "box4", "left", 273, 4],
[0.5, "box5", "left", 200, 4],
];
function setupTest()
{
document.getElementById('container').className = 'animating';
}
runTransitionTest(expectedValues, setupTest, usePauseAPI);
</script>
</head>
<body>
<div id="container">
<div id="box1" class="box" style="-webkit-transition-timing-function: linear;"></div>
<div id="box2" class="box" style="-webkit-transition-timing-function: ease;"></div>
<div id="box3" class="box" style="-webkit-transition-timing-function: ease-in;"></div>
<div id="box4" class="box" style="-webkit-transition-timing-function: ease-out;"></div>
<div id="box5" class="box" style="-webkit-transition-timing-function: ease-in-out;"></div>
</div>
<div id="result"></div>
</body>
</html>