Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/compositing/scrollbars/mac-programmatic-scroll-shows-overlay-scrollbars.html |
| diff --git a/third_party/WebKit/LayoutTests/compositing/scrollbars/mac-programmatic-scroll-shows-overlay-scrollbars.html b/third_party/WebKit/LayoutTests/compositing/scrollbars/mac-programmatic-scroll-shows-overlay-scrollbars.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d741d7560f26cfcc42fa5431f879c45a56ca8609 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/compositing/scrollbars/mac-programmatic-scroll-shows-overlay-scrollbars.html |
| @@ -0,0 +1,47 @@ |
| +<!DOCTYPE HTML> |
| +<head> |
| + <style> |
| + #spacer { |
| + height: 1000px; |
| + width: 1000px; |
| + } |
| + </style> |
| + <script> |
| + if (internals) { |
| + internals.settings.setOverlayScrollbarsEnabled(true); |
| + internals.settings.setMockScrollbarsEnabled(false); |
| + } |
| + |
| + if (testRunner) { |
| + testRunner.dumpAsTextWithPixelResults(); |
| + testRunner.waitUntilDone(); |
| + } |
| + |
| + onload = function() { |
| + var numRafs = 0; |
| + |
| + // Produce a programmatic scroll on each frame and make |
| + // sure the overlay scrollbars show up. |
| + var raf = function() { |
| + window.scrollBy(1, 1); |
| + ++numRafs; |
| + |
| + // About 16 frames in, the scrollbars should appear. |
| + // Capture a pixel dump shortly after. Note: this is |
| + // 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
|
| + // no better way to detect when the scrollbars should |
| + // show. |
| + if (numRafs >= 20 && testRunner) |
| + testRunner.notifyDone(); |
| + |
| + requestAnimationFrame(raf); |
| + } |
| + |
| + requestAnimationFrame(raf); |
| + }; |
| + </script> |
| +</head> |
| + |
| +<body> |
| + <div id="spacer"></div> |
| +</body> |