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

Unified 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, 10 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 side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698