Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE HTML> | |
| 2 <head> | |
| 3 <style> | |
| 4 #spacer { | |
| 5 height: 1000px; | |
| 6 width: 1000px; | |
| 7 } | |
| 8 </style> | |
| 9 <script> | |
| 10 if (internals) { | |
| 11 internals.settings.setOverlayScrollbarsEnabled(true); | |
| 12 internals.settings.setMockScrollbarsEnabled(false); | |
| 13 } | |
| 14 | |
| 15 if (testRunner) { | |
| 16 testRunner.dumpAsTextWithPixelResults(); | |
| 17 testRunner.waitUntilDone(); | |
| 18 } | |
| 19 | |
| 20 onload = function() { | |
| 21 var numRafs = 0; | |
| 22 | |
| 23 // Produce a programmatic scroll on each frame and make | |
| 24 // sure the overlay scrollbars show up. | |
| 25 var raf = function() { | |
| 26 window.scrollBy(1, 1); | |
| 27 ++numRafs; | |
| 28 | |
| 29 // About 16 frames in, the scrollbars should appear. | |
| 30 // Capture a pixel dump shortly after. Note: this is | |
| 31 // likely to cause some flakes on slow runs but we have | |
|
Rick Byers
2016/02/29 19:06:32
If there's no good reliable way to test this (with
| |
| 32 // no better way to detect when the scrollbars should | |
| 33 // show. | |
| 34 if (numRafs >= 20 && testRunner) | |
| 35 testRunner.notifyDone(); | |
| 36 | |
| 37 requestAnimationFrame(raf); | |
| 38 } | |
| 39 | |
| 40 requestAnimationFrame(raf); | |
| 41 }; | |
| 42 </script> | |
| 43 </head> | |
| 44 | |
| 45 <body> | |
| 46 <div id="spacer"></div> | |
| 47 </body> | |
| OLD | NEW |