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

Side by Side Diff: LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-div-not-propagated.html

Issue 12817006: Merge 144519 "EventHandler::handleGestureScrollUpdate() should i..." (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <link rel="stylesheet" href="../../../js/resources/js-test-style.css"> 4 <link rel="stylesheet" href="../../../js/resources/js-test-style.css">
5 <script src="../../../js/resources/js-test-pre.js"></script> 5 <script src="../../../js/resources/js-test-pre.js"></script>
6 <script src="resources/gesture-helpers.js"></script> 6 <script src="resources/gesture-helpers.js"></script>
7 <style type="text/css"> 7 <style type="text/css">
8 8
9 ::-webkit-scrollbar { 9 ::-webkit-scrollbar {
10 width: 0px; 10 width: 0px;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 var gesturesOccurred = 0; 85 var gesturesOccurred = 0;
86 var scrollAmountX = ['0', '0']; 86 var scrollAmountX = ['0', '0'];
87 var scrollAmountY = ['0', '0']; 87 var scrollAmountY = ['0', '0'];
88 var wheelEventsOccurred = 0; 88 var wheelEventsOccurred = 0;
89 var expectedWheelEventsOccurred = ['0', '0']; 89 var expectedWheelEventsOccurred = ['0', '0'];
90 var scrollEventsOccurred = 0; 90 var scrollEventsOccurred = 0;
91 var scrolledElement = 'movedbox' 91 var scrolledElement = 'movedbox'
92 var scrollEventsOccurred = 0; 92 var scrollEventsOccurred = 0;
93 var expectedScrollEventsOccurred = '1'; 93 var expectedScrollEventsOccurred = '1';
94 94
95
96 function recordScroll(event) {
97 debug('scroll event ' + scrollEventsOccurred + '+> ' + event.target);
98 scrollEventsOccurred++;
99
100 if (window.eventSender) {
101 // Because scroll events arrive asynchronously, only one will ar rive.
102 if (gesturesOccurred == expectedGesturesTotal) {
103 shouldBe('scrollEventsOccurred', expectedScrollEventsOcc urred);
104 // If we've got here, we've passed.
105 successfullyParsed = true;
106 isSuccessfullyParsed();
107 if (window.testRunner)
108 testRunner.notifyDone();
109 }
110 }
111 }
112
113
114 function firstGestureScroll() 95 function firstGestureScroll()
115 { 96 {
116 debug("first gesture"); 97 debug("first gesture");
117 eventSender.gestureScrollBegin(10, 72); 98 eventSender.gestureScrollBegin(10, 72);
118 eventSender.gestureScrollUpdateWithoutPropagation(0, -150); 99 eventSender.gestureScrollUpdateWithoutPropagation(0, -150);
119 eventSender.gestureScrollEnd(0, 0); 100 eventSender.gestureScrollEnd(0, 0);
120 101
121 // Wait for layout. 102 // Wait for layout.
122 checkScrollOffset(); 103 checkScrollOffset();
123 } 104 }
124 105
125 function secondGestureScroll() 106 function secondGestureScroll()
126 { 107 {
127 debug("second gesture"); 108 debug("second gesture");
128 eventSender.gestureScrollBegin(12, 40); 109 eventSender.gestureScrollBegin(12, 40);
129 eventSender.gestureScrollUpdateWithoutPropagation(0, -60); 110 eventSender.gestureScrollUpdateWithoutPropagation(0, -50);
111 eventSender.gestureScrollUpdateWithoutPropagation(0, -10);
130 eventSender.gestureScrollEnd(0, 0); 112 eventSender.gestureScrollEnd(0, 0);
131 113
132 // Wait for layout. 114 // Wait for layout.
133 checkScrollOffset(); 115 checkScrollOffset();
134 } 116 }
135 117
136 if (window.testRunner) 118 if (window.testRunner)
137 testRunner.waitUntilDone(); 119 testRunner.waitUntilDone();
138 120
139 function runTest() 121 function runTest()
(...skipping 15 matching lines...) Expand all
155 } else { 137 } else {
156 debug("This test requires DumpRenderTree. Gesture-scroll the page to va lidate the implementation."); 138 debug("This test requires DumpRenderTree. Gesture-scroll the page to va lidate the implementation.");
157 } 139 }
158 } 140 }
159 </script> 141 </script>
160 142
161 143
162 144
163 </body> 145 </body>
164 </html> 146 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698