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

Side by Side Diff: third_party/WebKit/LayoutTests/transitions/change-duration-during-transition.html

Issue 2521493002: CSS Transitions: Reduce usage of -webkit prefix in layout tests (Closed)
Patch Set: Created 4 years, 1 month 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 2
3 <html> 3 <html>
4 <head> 4 <head>
5 <style> 5 <style>
6 #box { 6 #box {
7 position: absolute; 7 position: absolute;
8 height: 100px; 8 height: 100px;
9 width: 100px; 9 width: 100px;
10 left: 0px; 10 left: 0px;
11 background-color: blue; 11 background-color: blue;
12 -webkit-transition-duration: 1s; 12 transition-duration: 1s;
13 -webkit-transition-timing-function: linear; 13 transition-timing-function: linear;
14 -webkit-transition-property: left; 14 transition-property: left;
15 } 15 }
16 </style> 16 </style>
17 <script src="../animations/resources/animation-test-helpers.js" type="text/jav ascript"></script> 17 <script src="../animations/resources/animation-test-helpers.js" type="text/jav ascript"></script>
18 <script> 18 <script>
19 const expectedValues = [ 19 const expectedValues = [
20 // [time, element-id, property, expected-value, tolerance] 20 // [time, element-id, property, expected-value, tolerance]
21 [0.5, 'box', 'left', 50, 10], 21 [0.5, 'box', 'left', 50, 10],
22 [0.8, 'box', 'left', 0, 0], 22 [0.8, 'box', 'left', 0, 0],
23 ]; 23 ];
24 24
25 function changeDuration() { 25 function changeDuration() {
26 box.style.webkitTransitionDuration = "0.1s"; 26 box.style.transitionDuration = "0.1s";
27 } 27 }
28 28
29 function goBack() { 29 function goBack() {
30 box.style.left = "0px"; 30 box.style.left = "0px";
31 } 31 }
32 32
33 const callbacks = { 33 const callbacks = {
34 0.1: changeDuration, 34 0.1: changeDuration,
35 0.6: goBack, 35 0.6: goBack,
36 } 36 }
37 37
38 function setupTest() { 38 function setupTest() {
39 box.style.left = '100px'; 39 box.style.left = '100px';
40 } 40 }
41 41
42 runTransitionTest(expectedValues, setupTest, callbacks, false, true); 42 runTransitionTest(expectedValues, setupTest, callbacks, false, true);
43 </script> 43 </script>
44 </head> 44 </head>
45 <body> 45 <body>
46 <div id="box"></div> 46 <div id="box"></div>
47 </body> 47 </body>
48 </html> 48 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698