1 function recordWheel(event)
3 debug('wheel event ' + wheelEventsOccurred + '+> ' + event.target);
7 function recordScroll(event)
9 debug('scroll event ' + scrollEventsOccurred + '+> ' + event.target);
10 scrollEventsOccurred++;
12 if (window.eventSender) {
13 // Because scroll events arrive asynchronously, only one will arrive.
14 if (gesturesOccurred == expectedGesturesTotal) {
15 shouldBe('scrollEventsOccurred', expectedScrollEventsOccurred);
16 if (window.jsTestIsAsync) {
19 // If we've got here, we've passed.
20 successfullyParsed = true;
21 isSuccessfullyParsed();
22 if (window.testRunner)
23 testRunner.notifyDone();
29 function exitIfNecessary()
31 debug('gesture events not implemented on this platform or gesture event scrolling of a document is broken');
32 if (window.jsTestIsAsync) {
35 // If we've got here, we've passed.
36 successfullyParsed = true;
37 isSuccessfullyParsed();
38 if (window.testRunner)
39 testRunner.notifyDone();
43 function checkTestDependencies()
45 return eventSender.gestureScrollBegin && eventSender.gestureScrollUpdate && eventSender.gestureScrollEnd;
48 function checkScrollOffset()
50 if (window.eventSender) {
51 shouldBe(scrolledElement + '.' + 'scrollTop', scrollAmountY[gesturesOccurred]);
52 shouldBe(scrolledElement + '.' + 'scrollLeft', scrollAmountX[gesturesOccurred]);
53 shouldBe('wheelEventsOccurred', expectedWheelEventsOccurred[gesturesOccurred]);
56 if (gesturesOccurred < expectedGesturesTotal) {
57 wheelEventsOccurred = 0;
58 secondGestureScroll();