blob: 66febacff97e42a673b1da59aac0f6371f9ec5ad [file] [log] [blame]
<!doctype html><!-- webkit-test-runner [ experimental:WebAnimationsCSSIntegrationEnabled=true ] -->
<html>
<head>
<title>cubic-bezier value overflow: Lengths</title>
<style>
.box {
position: relative;
left: 0;
height: 100px;
width: 100px;
margin: 10px;
background-color: blue;
-webkit-transition: left 1s linear;
}
.animating > .box {
left: 400px;
}
</style>
<script src="resources/transition-test-helpers.js"></script>
<script>
const expectedValues = [
// [time, element-id, property, expected-value, tolerance]
[0.50, "box1", "left", 488, 4],
[0.95, "box1", "left", 440, 4],
[0.10, "box2", "left", -55, 4],
[0.50, "box2", "left", 145, 4],
[0.95, "box2", "left", 432, 4],
[0.10, "box3", "left", -106, 4],
[0.50, "box3", "left", -441, 4],
[0.15, "box4", "left", 513, 4],
[0.50, "box4", "left", 200, 4],
[0.80, "box4", "left", -98, 4],
];
function setupTest() {
document.getElementById('container').className = 'animating';
}
runTransitionTest(expectedValues, setupTest, usePauseAPI);
</script>
</head>
<body>
<div id="container">
<div class="box" id="box1" style="-webkit-transition-timing-function: cubic-bezier(0.3, 1.5, 0.8, 1.5);"></div>
<div class="box" id="box2" style="-webkit-transition-timing-function: cubic-bezier(0.4, -0.8, 0.7, 1.7);"></div>
<div class="box" id="box3" style="-webkit-transition-timing-function: cubic-bezier(0.7, -2, 1, -1.5);"></div>
<div class="box" id="box4" style="-webkit-transition-timing-function: cubic-bezier(0, 4, 1, -3);"></div>
</div>
<div id="result"></div>
</body>
</html>