blob: a7ee3959e8af2769b5a0e6ddc9fa46d7ebc34134 [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: relative;
left: 100px;
height: 100px;
width: 100px;
background-color: blue;
animation-duration: 10s;
animation-timing-function: linear;
animation-name: anim;
}
@keyframes anim {
from { left: 10px; }
to { left: 810px; }
}
#box1 {
top: 10px;
background-color: blue;
}
#box2 {
top: 10px;
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", "left", 170, 5],
[2, "box2", "left", 170, 5],
[2, ["box1", "box2"], "left", "", 0],
[5, "box1", "left", 410, 5],
[5, "box2", "left", 410, 5],
[5, ["box1", "box2"], "left", "", 0],
[8, "box1", "left", 650, 5],
[8, "box2", "left", 650, 5],
[8, ["box1", "box2"], "left", "", 0],
];
runAnimationTest(expectedValues);
</script>
</head>
<body>
This test performs an animation of the left 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">
</div>
</body>
</html>