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

Side by Side Diff: LayoutTests/rubberbanding/momentum-reset.html

Issue 977663002: Mac: Delete now-dead elastic overscroll code (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 <html>
3 <head><title>Tests that a momentum scroll (i.e. a fling) eventually resets back to no-overhang state</title></head>
4 <body>
5 <div id="box" style="height:800px; background: red; border:2px solid black; widt h:100%"></div>
6 <div id="info">This test requires DRT.</div>
7 <script>
8 if (window.internals) {
9 document.getElementById('info').style.visibility = 'hidden';
10 internals.settings.setMockScrollbarsEnabled(false);
11
12 eventSender.mouseMoveTo(10, 10);
13 eventSender.mouseDragBegin();
14 eventSender.mouseDragEnd();
15
16 // Simulate a momentum scroll following the end of a normal scroll.
17 eventSender.mouseMomentumBegin2(0, 0, false, true);
18 eventSender.mouseMomentumScrollBy(0, 250, false, true);
19 eventSender.mouseMomentumEnd();
20
21 // The momentum scroll above should have resulted in overflow above the page.
22 // Ensure that it has (via scrollTop) and register an onscroll listener to
23 // ensure that the timer restores the position.
24 if (document.documentElement.scrollTop == 0) {
25 // FAIL: Above didn't result in overscroll.
26 document.getElementById('box').style.background = 'blue';
27 } else {
28
29 document.getElementById('box').style.background = 'green';
30 // Wait for the timer to restore the position.
31 testRunner.waitUntilDone();
32 var startedScrolling = false;
33 window.onscroll = function() {
34 if (document.documentElement.scrollTop == 0) {
35 testRunner.notifyDone();
36 }
37 };
38 }
39 }
40 </script>
41 </body>
42 </html>
OLDNEW
« no previous file with comments | « LayoutTests/rubberbanding/event-overhang-w-expected.txt ('k') | LayoutTests/rubberbanding/overhang-e.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698