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

Side by Side Diff: third_party/WebKit/LayoutTests/animations/transform-responsive-neutral-keyframe.html

Issue 2346163003: Deflake virtual/threaded/animations/{opacity,transform}-responsive-neutral-keyframe.html (Closed)
Patch Set: Simplify Created 4 years, 3 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <style> 2 <style>
3 div { 3 div {
4 position: absolute; 4 position: absolute;
5 width: 100px; 5 width: 100px;
6 height: 100px; 6 height: 100px;
7 } 7 }
8 #target { 8 #target {
9 background: red; 9 background: red;
10 transform: translateY(100px); 10 transform: translateX(100px);
11 animation: test 1e8s; 11 animation: test 1e8s;
12 } 12 }
13 #expected { 13 #expected {
14 background: green; 14 background: green;
15 transform: translateY(50px); 15 transform: translateX(50px);
16 } 16 }
17 @keyframes test { 17 @keyframes test {
18 to { transform: translateX(100px); } 18 to { transform: translateX(50px); }
Eric Willigers 2016/09/19 04:50:55 Can this be completely different, like translateX(
alancutter (OOO until 2018) 2016/09/19 05:14:00 Making it different just increases the chance of t
19 } 19 }
20 </style> 20 </style>
21 <div id="target"></div> 21 <div id="target"></div>
22 <div id="expected"></div> 22 <div id="expected"></div>
23 <script> 23 <script>
24 if (window.testRunner) 24 if (window.testRunner)
25 testRunner.waitUntilDone(); 25 testRunner.waitUntilDone();
26 26
27 requestAnimationFrame(() => { 27 function waitForCompositor() {
28 requestAnimationFrame(() => { 28 return target.animate({opacity: ['1', '1']}, 1).ready;
29 target.style.transform = 'translateY(50px)'; 29 }
30 requestAnimationFrame(() => { 30
31 if (window.testRunner) 31 waitForCompositor().then(() => {
32 testRunner.notifyDone(); 32 target.style.transform = 'translateX(50px)';
33 }); 33 }).then(() => waitForCompositor()).then(() => {
34 }); 34 if (window.testRunner)
35 testRunner.notifyDone();
35 }); 36 });
36 </script> 37 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698