blob: bb31943764b5c0fb0e38382bb96bf48641370b5f [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Test simultaneous starting of two animations</title>
<style type="text/css" media="screen">
.box {
position: absolute;
top: 40px;
height: 100px;
width: 100px;
background-color: blue;
-webkit-animation-duration: 10s;
-webkit-animation-timing-function: linear;
-webkit-animation-name: "anim";
}
@-webkit-keyframes "anim" {
from { -webkit-transform: rotate(0deg); }
to { -webkit-transform: rotate(360deg); }
}
#box1 {
left: 40px;
background-color: blue;
}
#box2 {
left: 160px;
background-color: red;
}
</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]
["anim", 2, "box1", "webkitTransform", [ 0.309017, 0.951057 ], 0.05],
["anim", 2, "box2", "webkitTransform", [ 0.309017, 0.951057 ], 0.05],
["anim", 2, ["box1", "box2"], "webkitTransform", "", 0],
["anim", 5, "box1", "webkitTransform", [ -1, 0 ], 0.05],
["anim", 5, "box2", "webkitTransform", [ -1, 0 ], 0.05],
["anim", 5, ["box1", "box2"], "webkitTransform", "", 0],
["anim", 8, "box1", "webkitTransform", [ 0.309017, -0.951057 ], 0.05],
["anim", 8, "box2", "webkitTransform", [ 0.309017, -0.951057 ], 0.05],
["anim", 8, ["box1", "box2"], "webkitTransform", "", 0],
];
runAnimationTest(expectedValues);
</script>
</head>
<body>
This test performs an animation of the transform property. It animates over 10 seconds.
It takes 3 snapshots and expects each result to be within a specified range.
<div id="box1" class="box">
</div>
<div id="box2" class="box">
</div>
<div id="result" style="position:absolute; top:150px">
</div>
</body>
</html>