blob: d38d5d03a6bdb687a7b80118880ef63c0c7edb57 [file] [log] [blame]
<!DOCTYPE html><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] -->
<html>
<head>
<style type="text/css" media="screen">
body {
margin: 0;
}
.box {
position: relative;
width: 100px;
height: 100px;
left: 0;
background-color: green;
}
.indicator {
position: absolute;
width: 100px;
height: 100px;
left: 100px;
background-color: red;
}
#indicator1 {
top: 0;
}
#indicator2 {
top: 100px;
}
#box1 {
left: 200px;
-webkit-animation: move-left 2s linear;
}
#box2 {
-webkit-transform: translateX(200px);
-webkit-animation: move-transform 2s linear;
}
@-webkit-keyframes move-left {
0% {
left: 0;
opacity: 0;
}
50% {
left: 0;
opacity: 1;
}
75% {
opacity: 1;
}
100% {
opacity: 1;
}
}
@-webkit-keyframes move-transform {
0% {
-webkit-transform: translateX(0);
opacity: 0;
}
50% {
-webkit-transform: translateX(0);
opacity: 1;
}
75% {
opacity: 1;
}
100% {
opacity: 1;
}
}
#result {
visibility: hidden; /* hide from pixel results */
}
</style>
<script src="resources/animation-test-helpers.js" type="text/javascript"></script>
<script type="text/javascript">
const expectedValues = [
["move-left", 1.5, "box1", "left", 100, 15],
["move-transform", 1.5, "box2", "webkitTransform.4", 100, 15],
];
var doPixelTest = true;
var disablePauseAPI = false;
runAnimationTest(expectedValues, null, undefined, disablePauseAPI, doPixelTest);
</script>
</head>
<body>
<!-- In the pixel result, you should see two vertically adjacent green squares. There should be no red.
Test is only reliable when run in DRT. -->
<div class="indicator" id="indicator1"></div>
<div class="indicator" id="indicator2"></div>
<div class="box" id="box1"></div>
<div class="box" id="box2"></div>
<div id="result"></div>
</body>
</html>