blob: 45d3588047852e20c85616c38c0a268ba765ae14 [file] [log] [blame]
<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAnimationsCSSIntegrationEnabled=false ] -->
<html>
<head>
<style type="text/css" media="screen">
#container {
position: relative;
border: 1px solid black;
height: 100px;
width: 500px;
}
#box {
position: absolute;
height: 100px;
width: 100px;
background-color: blue;
-webkit-animation-name: move;
-webkit-animation-duration: 2s;
-webkit-animation-direction: alternate-reverse;
-webkit-animation-iteration-count: 2;
-webkit-animation-timing-function: linear;
}
@-webkit-keyframes move {
0% {
left: 0;
}
100% {
left: 400px;
}
}
</style>
<script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
const expectedValues = [
// [animation-name, time, element-id, property, expected-value, tolerance]
["move", 1.0, "box", "left", 200, 20],
["move", 2.0, "box", "left", 0, 20],
["move", 3.0, "box", "left", 200, 20],
["move", 4.0, "box", "left", 400, 20],
];
runAnimationTest(expectedValues);
</script>
</head>
<body>
<!-- Test animation-direction: alternate-reverse -->
<div id="container">
<div id="box"></div>
</div>
<div id="result"></div>
</body>
</html>