blob: d1725bb555be29e14d4c469c94fccb59c35375d4 (
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
<!DOCTYPE html>
<html>
<head>
<style>
#container {
position: relative;
width: 400px;
height: 100px;
border: 1px solid black;
}
.box {
position: absolute;
width: 100px;
height: 100px;
background-color: green;
}
.indicator {
left: 150px;
top: 0;
background-color: red;
}
#container.moved .software {
left: 300px;
}
#container.moved .hardware {
-webkit-transform: translateX(300px);
}
.hardware {
-webkit-transform-style: preserve-3d;
-webkit-transition: -webkit-transform 300ms linear;
-webkit-transform: translateX(0);
}
</style>
<script src="../animations/resources/animation-test-helpers.js"></script>
<script type="text/javascript">
function testEnded()
{
var testDiv = document.getElementById('tester');
testDiv.style.webkitTransitionProperty = 'none';
testDiv.style.webkitTransitionDuration = '0';
testDiv.style.webkitTransform = 'translateX(150px)';
if (window.testRunner)
testRunner.notifyDone();
}
function startTest()
{
if (window.testRunner)
testRunner.waitUntilDone();
document.getElementById('tester').addEventListener('webkitTransitionEnd', testEnded, false);
document.getElementById('container').className = 'moved';
}
window.addEventListener('load', startTest, false);
</script>
</head>
<body>
<p>At the end of the test the green box should obscure the red box.</p>
<div id="container">
<div class="indicator box"></div>
<div id="tester" class="hardware box"></div>
</div>
<div id="result">
</div>
</body>
</html>
|