blob: b76eb65aed33c846c4dcec45b97d541a038ce7ba [file] [log] [blame]
<!doctype html><!-- webkit-test-runner [ experimental:WebAnimationsCSSIntegrationEnabled=true ] -->
<html>
<head>
<title>cubic-bezier value overflow: Colors</title>
<style>
.box {
position: relative;
left: 0;
height: 100px;
width: 100px;
margin: 10px;
background-color: #404040;
-webkit-transition: background-color 1s linear;
}
.animating > .box {
background-color: #C0C0C0;
}
.animating > .box.colored {
background-color: papayawhip;
}
</style>
<script src="resources/transition-test-helpers.js"></script>
<script>
const expectedValues = [
// [time, element-id, property, expected-value, tolerance]
[0.50, "box1", "background-color", [220, 220, 220], 10],
[0.95, "box1", "background-color", [207, 207, 207], 10],
[0.10, "box2", "background-color", [45, 45, 45], 15],
[0.50, "box2", "background-color", [106, 106, 106], 15],
[0.95, "box2", "background-color", [204, 204, 204], 15],
[0.10, "box3", "background-color", [0, 2, 11], 15],
[0.50, "box3", "background-color", [0, 0, 0], 0],
[0.15, "box4", "background-color", [255, 255, 255], 0],
[0.50, "box4", "background-color", [166, 155, 140], 15],
[0.80, "box4", "background-color", [17, 22, 28], 15],
];
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 colored" id="box3" style="-webkit-transition-timing-function: cubic-bezier(0.7, -2, 1, -1.5);"></div>
<div class="box colored" id="box4" style="-webkit-transition-timing-function: cubic-bezier(0, 4, 1, -3);"></div>
</div>
<div id="result"></div>
</body>
</html>