blob: a1c6fe7ebe3172caf595c8e48382bdf5a9702e4a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
<!DOCTYPE html>
<html>
<head>
<style type="text/css" media="screen">
.box {
position: absolute;
height: 100px;
width: 100px;
left: 0px;
background-color: blue;
}
.box.animating {
-webkit-animation: move 1s linear;
left: 400px;
}
@-webkit-keyframes move {
from {
}
to {
left: 500px;
}
}
#result {
margin-top: 130px;
}
</style>
<script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
if (window.testRunner)
testRunner.waitUntilDone();
const expectedValues = [
// [time, element-id, property, expected-value, tolerance]
[0.5, "test", "left", 450, 8],
];
function setupTest()
{
document.getElementById('test').className = 'animating box';
runAnimationTest(expectedValues);
}
window.addEventListener('load', function() {
window.setTimeout(setupTest, 0);
}, false);
</script>
</head>
<body>
<p>Box should animate from left of 400px to 500px.</p>
<div id="test" class="box"></div>
<div id="result"></div>
</body>
</html>
|