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

Unified Diff: LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-page.html

Issue 1298973004: Remove special wheel handling path from ScrollableArea (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed TODO Created 5 years, 4 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
« no previous file with comments | « no previous file | LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-page-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-page.html
diff --git a/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-page.html b/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-page.html
index 709b07b63ff15e42668aeb5137393aa5ba31545f..5c12c89ce9b66c6bb640441d8fa42c3fa715dbf1 100644
--- a/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-page.html
+++ b/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-page.html
@@ -2,10 +2,23 @@
<head>
<script src="../../resources/js-test.js"></script>
<script>
+ var isMacOSX = navigator.userAgent.indexOf("Mac OS X") >= 0;
+
var givenScrollTop = 2; // Only one page per event, so this should be interpreted as 1
var givenScrollLeft = 2;
- var expectedScrollTop = 511; // Window is 800x600. 15 pixel scrollbars. Scroll 87.5% of visible.
- var expectedScrollLeft = 686;
+
+ var maxOverlapBetweenPages = 40;
+
+ // Window is 800x600. Page scrolls 87.5% of window size.
+ var expectedScrollTop = 600 * 0.875;
+ var expectedScrollLeft = 800 * 0.875;
+
+ if (isMacOSX) {
+ // On Mac, there is a max overlap between pages that can affect the page scroll size.
+ expectedScrollTop = Math.max(expectedScrollTop, 600 - maxOverlapBetweenPages);
+ expectedScrollLeft = Math.max(expectedScrollLeft, 800 - maxOverlapBetweenPages);
+ }
+
var event;
var div;
« no previous file with comments | « no previous file | LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-page-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698