Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
| 2 "http://www.w3.org/TR/html4/loose.dtd"> | 2 "http://www.w3.org/TR/html4/loose.dtd"> |
| 3 | 3 |
| 4 <html lang="en"> | 4 <html lang="en"> |
| 5 <head> | 5 <head> |
| 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 7 <title>25052 testcase</title> | 7 <title>25052 testcase</title> |
| 8 <style type="text/css" media="screen"> | 8 <style type="text/css" media="screen"> |
| 9 body { | 9 body { |
| 10 margin: 100px; | 10 margin: 100px; |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 33 width: 150px; | 33 width: 150px; |
| 34 background-color: blue; | 34 background-color: blue; |
| 35 } | 35 } |
| 36 | 36 |
| 37 #mover { | 37 #mover { |
| 38 position: absolute; | 38 position: absolute; |
| 39 top: 0; | 39 top: 0; |
| 40 height: 150px; | 40 height: 150px; |
| 41 width: 150px; | 41 width: 150px; |
| 42 background-color: green; | 42 background-color: green; |
| 43 transition: transform 1000s; | 43 transition: transform 1s; |
| 44 } | 44 } |
| 45 | 45 |
| 46 #mover:hover { | 46 #mover:hover { |
| 47 transform: translate(0px, 100px); | 47 transform: translate(0px, 100px); |
| 48 } | 48 } |
| 49 #mover.moving { | 49 #mover.moving { |
| 50 transform: translate(0px, 100px); | 50 transform: translate(0px, 100px); |
| 51 } | 51 } |
| 52 </style> | 52 </style> |
| 53 <script type="text/javascript" charset="utf-8"> | 53 <script type="text/javascript" charset="utf-8"> |
| 54 if (window.testRunner) | 54 if (window.testRunner) |
| 55 testRunner.waitUntilDone(); | 55 testRunner.waitUntilDone(); |
| 56 | 56 |
| 57 function waitForCompositor() { | |
| 58 return document.body.animate({opacity: [1, 1]}, 1).finished; | |
| 59 } | |
| 60 | |
| 57 function startTest() | 61 function startTest() |
| 58 { | 62 { |
| 59 window.setTimeout(function() { | 63 var mover = document.getElementById('mover'); |
| 60 var mover = document.getElementById('mover'); | 64 getComputedStyle(mover).transform; // Force style recalc |
| 61 mover.className = 'moving'; | 65 mover.className = 'moving'; |
| 62 | 66 internals.pauseAnimations(0); |
|
wkorman
2017/02/17 23:12:38
This is usually behind an if (window.internals), s
Eric Willigers
2017/02/20 02:28:51
Done.
| |
| 63 window.setTimeout(function() { | 67 |
| 64 if (window.testRunner) | 68 waitForCompositor().then(() => { |
| 65 testRunner.notifyDone(); | 69 if (window.testRunner) { |
| 66 }, 0); | 70 testRunner.notifyDone(); |
| 67 | 71 } |
| 68 }, 0); | 72 }); |
| 69 } | 73 } |
| 70 | 74 |
| 71 window.addEventListener('load', startTest, false); | 75 window.addEventListener('load', startTest, false); |
| 72 </script> | 76 </script> |
| 73 </head> | 77 </head> |
| 74 <body> | 78 <body> |
| 75 | 79 |
| 76 <p>Things should not jump around when the green square starts the transition.</p > | 80 <p>Things should not jump around when the green square starts the transition.</p > |
| 77 <div id="container"> | 81 <div id="container"> |
| 78 <div id="header"> | 82 <div id="header"> |
| 79 <div id="hanger"></div> | 83 <div id="hanger"></div> |
| 80 </div> | 84 </div> |
| 81 <div id="mover"> | 85 <div id="mover"> |
| 82 </div> | 86 </div> |
| 83 </div> | 87 </div> |
| 84 | 88 |
| 85 </body> | 89 </body> |
| 86 </html> | 90 </html> |
| OLD | NEW |