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

Side by Side Diff: third_party/WebKit/LayoutTests/animations/opacity-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 opacity: 1; 10 opacity: 1;
11 animation: test 1e8s; 11 animation: test 1e8s;
12 } 12 }
13 #green { 13 #green {
14 background: green; 14 background: green;
15 } 15 }
16 @keyframes test { 16 @keyframes test {
17 to { opacity: 0.5; } 17 to { opacity: 0; }
18 } 18 }
19 </style> 19 </style>
20 <div id="green"></div> 20 <div id="green"></div>
21 <div id="target"></div> 21 <div id="target"></div>
22 <script> 22 <script>
23 if (window.testRunner) 23 if (window.testRunner)
24 testRunner.waitUntilDone(); 24 testRunner.waitUntilDone();
25 25
26 requestAnimationFrame(() => { 26 function waitForCompositor() {
27 requestAnimationFrame(() => { 27 return target.animate({transform: ['none', 'none']}, 1).ready;
28 target.style.opacity = 0; 28 }
29 requestAnimationFrame(() => { 29
30 if (window.testRunner) 30 waitForCompositor().then(() => {
31 testRunner.notifyDone(); 31 target.style.opacity = '0';
32 }); 32 }).then(() => waitForCompositor()).then(() => {
33 }); 33 if (window.testRunner)
34 testRunner.notifyDone();
34 }); 35 });
35 </script> 36 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698