4 <title>cubic-bezier value overflow: Transforms</title>
12 background-color: blue;
13 -webkit-transition: transform 1s linear;
14 transform: rotate(0deg);
17 transform: rotate(180deg);
20 <script src="../animations/resources/animation-test-helpers.js"></script>
22 function DegreesToRotation(angle) {
23 return roundNumber(Math.cos(angle * Math.PI / 180), 5);
26 const expectedValues = [
27 // [time, element-id, property, expected-value, tolerance]
28 [0.5, "box1", "-webkit-transform.0", DegreesToRotation(137), 0.3],
29 [0.95, "box1", "-webkit-transform.0", DegreesToRotation(190), 0.3],
30 [0.10, "box2", "-webkit-transform.0", DegreesToRotation(-27), 0.3],
31 [0.50, "box2", "-webkit-transform.0", DegreesToRotation(75), 0.3],
32 [0.95, "box2", "-webkit-transform.0", DegreesToRotation(193), 0.3],
33 [0.10, "box3", "-webkit-transform.0", DegreesToRotation(-68), 0.3],
34 [0.50, "box3", "-webkit-transform.0", DegreesToRotation(-203), 0.3],
35 [0.15, "box4", "-webkit-transform.0", DegreesToRotation(231), 0.3],
36 [0.50, "box4", "-webkit-transform.0", DegreesToRotation(80), 0.3],
37 [0.80, "box4", "-webkit-transform.0", DegreesToRotation(48), 0.3],
40 function setupTest() {
41 document.getElementById('container').className = 'animating';
44 runTransitionTest(expectedValues, setupTest);
49 <div class="box" id="box1" style="-webkit-transition-timing-function: cubic-bezier(0.3, 1.5, 0.8, 1.5);"></div>
50 <div class="box" id="box2" style="-webkit-transition-timing-function: cubic-bezier(0.4, -0.8, 0.7, 1.7);"></div>
51 <div class="box" id="box3" style="-webkit-transition-timing-function: cubic-bezier(0.7, -2, 1, -1.5);"></div>
52 <div class="box" id="box4" style="-webkit-transition-timing-function: cubic-bezier(0, 4, 1, -3);"></div>
54 <div id="result"></div>