Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Side by Side Diff: third_party/WebKit/LayoutTests/transitions/cubic-bezier-overflow-transform.html

Issue 2521493002: CSS Transitions: Reduce usage of -webkit prefix in layout tests (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>cubic-bezier value overflow: Transforms</title> 4 <title>cubic-bezier value overflow: Transforms</title>
5 <style> 5 <style>
6 .box { 6 .box {
7 position: relative; 7 position: relative;
8 left: 0; 8 left: 0;
9 height: 100px; 9 height: 100px;
10 width: 100px; 10 width: 100px;
11 margin: 10px; 11 margin: 10px;
12 background-color: blue; 12 background-color: blue;
13 -webkit-transition: transform 1s linear; 13 transition: transform 1s linear;
14 transform: rotate(0deg); 14 transform: rotate(0deg);
15 } 15 }
16 .animating > .box { 16 .animating > .box {
17 transform: rotate(180deg); 17 transform: rotate(180deg);
18 } 18 }
19 </style> 19 </style>
20 <script src="../animations/resources/animation-test-helpers.js"></script> 20 <script src="../animations/resources/animation-test-helpers.js"></script>
21 <script> 21 <script>
22 function DegreesToRotation(angle) { 22 function DegreesToRotation(angle) {
23 return roundNumber(Math.cos(angle * Math.PI / 180), 5); 23 return roundNumber(Math.cos(angle * Math.PI / 180), 5);
24 } 24 }
25 25
26 const expectedValues = [ 26 const expectedValues = [
27 // [time, element-id, property, expected-value, tolerance] 27 // [time, element-id, property, expected-value, tolerance]
28 [0.5, "box1", "-webkit-transform.0", DegreesToRotation(137), 0.3], 28 [0.5, "box1", "transform.0", DegreesToRotation(137), 0.3],
29 [0.95, "box1", "-webkit-transform.0", DegreesToRotation(190), 0.3], 29 [0.95, "box1", "transform.0", DegreesToRotation(190), 0.3],
30 [0.10, "box2", "-webkit-transform.0", DegreesToRotation(-27), 0.3], 30 [0.10, "box2", "transform.0", DegreesToRotation(-27), 0.3],
31 [0.50, "box2", "-webkit-transform.0", DegreesToRotation(75), 0.3], 31 [0.50, "box2", "transform.0", DegreesToRotation(75), 0.3],
32 [0.95, "box2", "-webkit-transform.0", DegreesToRotation(193), 0.3], 32 [0.95, "box2", "transform.0", DegreesToRotation(193), 0.3],
33 [0.10, "box3", "-webkit-transform.0", DegreesToRotation(-68), 0.3], 33 [0.10, "box3", "transform.0", DegreesToRotation(-68), 0.3],
34 [0.50, "box3", "-webkit-transform.0", DegreesToRotation(-203), 0.3], 34 [0.50, "box3", "transform.0", DegreesToRotation(-203), 0.3],
35 [0.15, "box4", "-webkit-transform.0", DegreesToRotation(231), 0.3], 35 [0.15, "box4", "transform.0", DegreesToRotation(231), 0.3],
36 [0.50, "box4", "-webkit-transform.0", DegreesToRotation(80), 0.3], 36 [0.50, "box4", "transform.0", DegreesToRotation(80), 0.3],
37 [0.80, "box4", "-webkit-transform.0", DegreesToRotation(48), 0.3], 37 [0.80, "box4", "transform.0", DegreesToRotation(48), 0.3],
38 ]; 38 ];
39 39
40 function setupTest() { 40 function setupTest() {
41 document.getElementById('container').className = 'animating'; 41 document.getElementById('container').className = 'animating';
42 } 42 }
43 43
44 runTransitionTest(expectedValues, setupTest); 44 runTransitionTest(expectedValues, setupTest);
45 </script> 45 </script>
46 </head> 46 </head>
47 <body> 47 <body>
48 <div id="container"> 48 <div id="container">
49 <div class="box" id="box1" style="-webkit-transition-timing-function: cubi c-bezier(0.3, 1.5, 0.8, 1.5);"></div> 49 <div class="box" id="box1" style="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: cubi c-bezier(0.4, -0.8, 0.7, 1.7);"></div> 50 <div class="box" id="box2" style="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: cubi c-bezier(0.7, -2, 1, -1.5);"></div> 51 <div class="box" id="box3" style="transition-timing-function: cubic-bezier (0.7, -2, 1, -1.5);"></div>
52 <div class="box" id="box4" style="-webkit-transition-timing-function: cubi c-bezier(0, 4, 1, -3);"></div> 52 <div class="box" id="box4" style="transition-timing-function: cubic-bezier (0, 4, 1, -3);"></div>
53 </div> 53 </div>
54 <div id="result"></div> 54 <div id="result"></div>
55 </body> 55 </body>
56 </html> 56 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698