blob: ef385f3fdb2de24f9d3550f817340aba68851ce1 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<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;
animation-duration: 10s;
animation-timing-function: linear;
animation-name: anim;
}
@keyframes anim {
from { transform: rotate(0deg); }
to { 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 = [
// [time, element-id, property, expected-value, tolerance]
[2, "box1", "transform", [ 0.309017, 0.951057, -0.951057, 0.309017, 0, 0 ], 0.05],
[2, "box2", "transform", [ 0.309017, 0.951057, -0.951057, 0.309017, 0, 0 ], 0.05],
[2, ["box1", "box2"], "transform", "", 0],
[5, "box1", "transform", [ -1, 0, 0, -1, 0, 0 ], 0.05],
[5, "box2", "transform", [ -1, 0, 0, -1, 0, 0 ], 0.05],
[5, ["box1", "box2"], "transform", "", 0],
[8, "box1", "transform", [ 0.309017, -0.951057, 0.951057, 0.309017, 0, 0 ], 0.05],
[8, "box2", "transform", [ 0.309017, -0.951057, 0.951057, 0.309017, 0, 0 ], 0.05],
[8, ["box1", "box2"], "transform", "", 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>