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

Side by Side Diff: LayoutTests/fast/events/touch/gesture/gesture-scrollbar-fling.html

Issue 901323004: Pass source device to window.eventSender.gestureFlingStart. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html> 2 <html>
3 3
4 <!-- This tests that the scrollbar thumb is deselected on a fling start --> 4 <!-- This tests that the scrollbar thumb is deselected on a fling start -->
5 5
6 <head> 6 <head>
7 <style type="text/css"> 7 <style type="text/css">
8 ::-webkit-scrollbar { 8 ::-webkit-scrollbar {
9 background-color: #ccc; 9 background-color: #ccc;
10 height: 15px; 10 height: 15px;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 movingDiv = document.getElementById('scrollable'); 52 movingDiv = document.getElementById('scrollable');
53 var scrollbarX = movingDiv.offsetLeft + movingDiv.offsetWidth - 5; 53 var scrollbarX = movingDiv.offsetLeft + movingDiv.offsetWidth - 5;
54 var scrollThumbSafeOffset = 80; 54 var scrollThumbSafeOffset = 80;
55 var scrollbarY = movingDiv.offsetTop + scrollThumbSafeOffset; 55 var scrollbarY = movingDiv.offsetTop + scrollThumbSafeOffset;
56 56
57 // Ensure we use a touch with an area to test under touch adjustment 57 // Ensure we use a touch with an area to test under touch adjustment
58 var touchWidth = 25; 58 var touchWidth = 25;
59 var touchHeight = 25; 59 var touchHeight = 25;
60 60
61 eventSender.gestureTapDown(scrollbarX, scrollbarY, touchWidth, touchHeight); 61 eventSender.gestureTapDown(scrollbarX, scrollbarY, touchWidth, touchHeight);
62 eventSender.gestureFlingStart(0, 0, 0, 0); 62 eventSender.gestureFlingStart(0, 0, 0, 0, "touchscreen");
63 } 63 }
64 64
65 function exitIfNecessary() 65 function exitIfNecessary()
66 { 66 {
67 debug('Gesture events not implemented on this platform or broken'); 67 debug('Gesture events not implemented on this platform or broken');
68 isSuccessfullyParsed(); 68 isSuccessfullyParsed();
69 } 69 }
70 70
71 function runTest() 71 function runTest()
72 { 72 {
73 internals.settings.setMockScrollbarsEnabled(true); 73 internals.settings.setMockScrollbarsEnabled(true);
74 74
75 if (window.eventSender) { 75 if (window.eventSender) {
76 if (eventSender.clearTouchPoints) 76 if (eventSender.clearTouchPoints)
77 scrollTest(); 77 scrollTest();
78 else 78 else
79 exitIfNecessary(); 79 exitIfNecessary();
80 } else { 80 } else {
81 debug("This test requires DumpRenderTree."); 81 debug("This test requires DumpRenderTree.");
82 } 82 }
83 } 83 }
84 </script> 84 </script>
85 </body> 85 </body>
86 </html> 86 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698