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
60
61
|
<!DOCTYPE>
<html>
<head>
<style>
.box {
height: 100px;
width: 100px;
margin: 10px;
-webkit-transition-duration: 1s;
-webkit-transition-timing-function: linear;
}
#box {
background: url('../fast/backgrounds/repeat/resources/gradient.gif') repeat 0 0;
-webkit-transition-property: background-position;
}
#box.final {
background-position: 20px 20px;
}
#box2 {
background: url('../fast/backgrounds/repeat/resources/gradient.gif') repeat 0 0;
-webkit-transition-property: -webkit-background-size;
-webkit-background-size: 10px 10px;
}
#box2.final {
-webkit-background-size: 30px 30px;
}
</style>
<script src="../animations/resources/animation-test-helpers.js" type="text/javascript"></script>
<script>
const expectedValues = [
// [time, element-id, property, expected-value, tolerance]
[0.5, 'box', 'background-position', [10, 10], 2],
[0.5, 'box2', '-webkit-background-size', [20, 20], 2],
];
function setupTest()
{
document.getElementById('box').className = 'box final';
document.getElementById('box2').className = 'box final';
}
runTransitionTest(expectedValues, setupTest);
</script>
</head>
<body>
<div id="box" class="box"></div>
<div id="box2" class="box"></div>
<div id="result">
</div>
</body>
</html>
|