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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../resources/js-test.js"></script> 3 <script src="../../resources/js-test.js"></script>
4 <script> 4 <script>
5 var isMacOSX = navigator.userAgent.indexOf("Mac OS X") >= 0;
6
5 var givenScrollTop = 2; // Only one page per event, so this should b e interpreted as 1 7 var givenScrollTop = 2; // Only one page per event, so this should b e interpreted as 1
6 var givenScrollLeft = 2; 8 var givenScrollLeft = 2;
7 var expectedScrollTop = 511; // Window is 800x600. 15 pixel scrollba rs. Scroll 87.5% of visible. 9
8 var expectedScrollLeft = 686; 10 var maxOverlapBetweenPages = 40;
11
12 // Window is 800x600. Page scrolls 87.5% of window size.
13 var expectedScrollTop = 600 * 0.875;
14 var expectedScrollLeft = 800 * 0.875;
15
16 if (isMacOSX) {
17 // On Mac, there is a max overlap between pages that can affect the page scroll size.
18 expectedScrollTop = Math.max(expectedScrollTop, 600 - maxOverlap BetweenPages);
19 expectedScrollLeft = Math.max(expectedScrollLeft, 800 - maxOverl apBetweenPages);
20 }
21
9 var event; 22 var event;
10 var div; 23 var div;
11 24
12 window.jsTestIsAsync = true; 25 window.jsTestIsAsync = true;
13 if (window.testRunner) 26 if (window.testRunner)
14 testRunner.waitUntilDone(); 27 testRunner.waitUntilDone();
15 28
16 function dispatchWheelEvent() 29 function dispatchWheelEvent()
17 { 30 {
18 document.body.addEventListener("mousewheel", mousewheelHandler, false); 31 document.body.addEventListener("mousewheel", mousewheelHandler, false);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 <div style="background-color:red;height:900px;width:1200px;position:re lative;left:0px;top:0px"></div> 64 <div style="background-color:red;height:900px;width:1200px;position:re lative;left:0px;top:0px"></div>
52 <div style="background-color:green;height:900px;width:1200px;position: relative;left:1200px;top:-900px"></div> 65 <div style="background-color:green;height:900px;width:1200px;position: relative;left:1200px;top:-900px"></div>
53 </div> 66 </div>
54 <div style="height:900px;width:2400px"> 67 <div style="height:900px;width:2400px">
55 <div style="background-color:blue;height:900px;width:1200px;position:r elative;left:0px;top:0px"></div> 68 <div style="background-color:blue;height:900px;width:1200px;position:r elative;left:0px;top:0px"></div>
56 <div style="background-color:yellow;height:900px;width:1200px;position :relative;left:1200px;top:-900px"></div> 69 <div style="background-color:yellow;height:900px;width:1200px;position :relative;left:1200px;top:-900px"></div>
57 </div> 70 </div>
58 <div id="console"></div> 71 <div id="console"></div>
59 </body> 72 </body>
60 </html> 73 </html>
OLDNEW
« 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