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

Side by Side Diff: third_party/WebKit/LayoutTests/transitions/transition-end-event-rendering.html

Issue 2619933002: CSS Transitions: Fix flaky transition-end-event-rendering.html (Closed)
Patch Set: Created 3 years, 11 months 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
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 2
3 <html> 3 <html>
4 <head> 4 <head>
5 <style> 5 <style>
6 body { 6 body {
7 margin: 0; 7 margin: 0;
8 } 8 }
9 9
10 #container { 10 #container {
11 position: relative; 11 position: relative;
12 width: 400px; 12 width: 400px;
13 height: 230px; 13 height: 230px;
14 border: 1px solid black; 14 border: 1px solid black;
15 } 15 }
16 16
17 .box { 17 .box {
18 position: relative; 18 position: relative;
19 width: 100px; 19 width: 100px;
20 height: 100px; 20 height: 100px;
21 margin: 10px 0; 21 margin: 10px 0;
22 background-color: green; 22 background-color: green;
23 } 23 }
24
25 #container.moved .software {
26 left: 300px;
27 }
28 24
29 #container.moved .hardware { 25 #container.moved .hardware {
30 transform: translateX(300px); 26 transform: translateX(300px);
31 } 27 }
32 28
33 .software {
34 -webkit-transition: left 300ms linear;
35 }
36
37 .hardware { 29 .hardware {
38 -webkit-transition: transform 1s linear; 30 -webkit-transition: transform 100ms linear;
39 transform: translateX(0); 31 transform: translateX(0);
40 } 32 }
41 33
42 </style> 34 </style>
43 <script src="../animations/resources/animation-test-helpers.js"></script>
44 <script> 35 <script>
36 'use strict';
37 function waitForCompositor() {
38 var tester = document.getElementById('tester');
39 return tester.animate({transform: ['scale(1)', 'scale(1)']}, 1).finished;
40 }
45 41
46 function testEnded() 42 function testEnded()
47 { 43 {
48 if (window.testRunner) 44 waitForCompositor().then(() => {
49 testRunner.notifyDone(); 45 if (window.testRunner)
46 testRunner.notifyDone();
47 });
50 } 48 }
51 49
52 function startTest() 50 function startTest()
53 { 51 {
54 if (window.testRunner) 52 if (window.testRunner)
55 testRunner.waitUntilDone(); 53 testRunner.waitUntilDone();
54
56 document.getElementById('tester').addEventListener('webkitTransitionEnd', testEnded, false); 55 document.getElementById('tester').addEventListener('webkitTransitionEnd', testEnded, false);
56 document.getElementById('container').offsetTop; // Force style recalc
57 document.getElementById('container').className = 'moved'; 57 document.getElementById('container').className = 'moved';
58 } 58 }
59 59
60 window.addEventListener('load', startTest, false); 60 window.addEventListener('load', startTest, false);
61 </script> 61 </script>
62 </head> 62 </head>
63 <body> 63 <body>
64 64
65 <div id="container"> 65 <div id="container">
66 <!-- <div class="software box"></div> -->
67 <div id="tester" class="hardware box"></div> 66 <div id="tester" class="hardware box"></div>
68 </div> 67 </div>
69 68
70 <div id="result"> 69 <div id="result">
71 </div> 70 </div>
72 71
73 </body> 72 </body>
74 </html> 73 </html>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698