57 lines
1.3 KiB
HTML
57 lines
1.3 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<style type="text/css">
|
|
.container {
|
|
position: relative;
|
|
height: 100px;
|
|
}
|
|
.box {
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
height: 100px;
|
|
width: 100px;
|
|
background-color: green;
|
|
}
|
|
|
|
#indicator {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 50px;
|
|
background-color: red;
|
|
}
|
|
|
|
#box {
|
|
-webkit-animation: anim 2s linear;
|
|
}
|
|
|
|
@-webkit-keyframes anim {
|
|
from { -webkit-transform: matrix(1, 0, 0, 1, 100, 0); }
|
|
to { -webkit-transform: matrix(1, 0, 0, 1, 0, 0); }
|
|
}
|
|
</style>
|
|
<script src="../resources/animation-test-helpers.js" type="text/javascript"></script>
|
|
<script type="text/javascript">
|
|
const expectedValues = [
|
|
// [animation, time, element-id, property, expected-value, tolerance]
|
|
["anim", 1, "box", "webkitTransform.4", 50, 2],
|
|
];
|
|
|
|
var pixelTest = true;
|
|
var disablePauseAPI = false;
|
|
runAnimationTest(expectedValues, null, null, disablePauseAPI, pixelTest);
|
|
</script>
|
|
</head>
|
|
<body>
|
|
|
|
<!-- In the pixel result, the green box should obscure the red box. -->
|
|
<div class="container">
|
|
<div id="indicator" class="box"></div>
|
|
<div class="box" id="box"></div>
|
|
</div>
|
|
|
|
<div id="result"></div>
|
|
</body>
|
|
</html>
|