OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../../../resources/js-test.js"></script> | 4 <script src="../../../../resources/js-test.js"></script> |
5 <script src="resources/gesture-helpers.js"></script> | 5 <script src="resources/gesture-helpers.js"></script> |
6 <style type="text/css"> | 6 <style type="text/css"> |
7 ::-webkit-scrollbar { | 7 ::-webkit-scrollbar { |
8 width: 0px; | 8 width: 0px; |
9 height: 0px; | 9 height: 0px; |
10 } | 10 } |
(...skipping 29 matching lines...) Expand all Loading... |
40 <div id="console"></div> | 40 <div id="console"></div> |
41 <script type="text/javascript"> | 41 <script type="text/javascript"> |
42 | 42 |
43 var expectedGesturesTotal = 2; | 43 var expectedGesturesTotal = 2; |
44 var gesturesOccurred = 0; | 44 var gesturesOccurred = 0; |
45 var scrollAmountX = ['0', '0']; | 45 var scrollAmountX = ['0', '0']; |
46 var scrollAmountY = ['140', '40']; | 46 var scrollAmountY = ['140', '40']; |
47 var wheelEventsOccurred = 0; | 47 var wheelEventsOccurred = 0; |
48 var expectedWheelEventsOccurred = ['0', '0']; | 48 var expectedWheelEventsOccurred = ['0', '0']; |
49 var scrollEventsOccurred = 0; | 49 var scrollEventsOccurred = 0; |
50 var scrolledElement = 'document.documentElement' | 50 var scrolledElement = 'document.body' |
51 var scrollEventsOccurred = 0; | 51 var scrollEventsOccurred = 0; |
52 var expectedScrollEventsOccurred = '1'; | 52 var expectedScrollEventsOccurred = '1'; |
53 | 53 |
54 function recordScroll(event) { | 54 function recordScroll(event) { |
55 debug('scroll event ' + scrollEventsOccurred + '+> ' + event.target); | 55 debug('scroll event ' + scrollEventsOccurred + '+> ' + event.target); |
56 scrollEventsOccurred++; | 56 scrollEventsOccurred++; |
57 | 57 |
58 if (window.eventSender) { | 58 if (window.eventSender) { |
59 // Because scroll events arrive asynchronously, only one will arrive. | 59 // Because scroll events arrive asynchronously, only one will arrive. |
60 if (gesturesOccurred == expectedGesturesTotal) { | 60 if (gesturesOccurred == expectedGesturesTotal) { |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 } else { | 136 } else { |
137 debug("This test requires DumpRenderTree. Gesture-scroll the page to va
lidate the implementation."); | 137 debug("This test requires DumpRenderTree. Gesture-scroll the page to va
lidate the implementation."); |
138 } | 138 } |
139 } | 139 } |
140 </script> | 140 </script> |
141 | 141 |
142 | 142 |
143 | 143 |
144 </body> | 144 </body> |
145 </html> | 145 </html> |
OLD | NEW |