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

Side by Side Diff: third_party/WebKit/LayoutTests/compositing/scrollbars/mac-programmatic-scroll-shows-overlay-scrollbars.html

Issue 1553003002: Fix Mac overlay scrollbars to show when programmatically scrolled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test expectation Created 4 years, 9 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
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698