4 <script src=
"../../../../resources/js-test.js"></script>
5 <script src=
"resources/gesture-helpers.js"></script>
6 <style type=
"text/css">
72 <body style=
"margin:0" onload=
"runTest();">
74 <div id=
"outermostdiv">
75 <table border=
"0" cellspacing=
"0px" >
78 <table border=
"0" cellspacing=
"0px" >
81 <table border=
"0" cellspacing=
"0px" >
82 <tr><td><div id=
"greenbox"></div></td></tr>
83 <tr><td><div id=
"redbox"></div></td></tr>
84 <tr><td><div id=
"greenbox"></div></td></tr>
85 <tr><td><div id=
"redbox"></div></td></tr>
90 <div id=
"bluebox"></div>
96 <div id=
"yellowbox"></div>
101 <p id=
"description"></p>
102 <div id=
"console"></div>
103 <script type=
"text/javascript">
107 var expectedGesturesTotal
= 2;
108 var gesturesOccurred
= 0;
109 var scrollAmountX
= ['0', '0'];
110 var scrollAmountY
= ['0', '25'];
111 var wheelEventsOccurred
= 0;
112 var expectedWheelEventsOccurred
= ['0', '0'];
113 var scrollEventsOccurred
= 0;
114 var scrolledElement
= 'movedbox'
115 var scrollEventsOccurred
= 0;
116 var expectedScrollEventsOccurred
= '1';
118 function firstGestureScroll()
120 debug("first gesture");
121 eventSender
.gestureScrollBegin(10, 72);
122 eventSender
.gestureScrollUpdate(0, -200);
123 eventSender
.gestureScrollUpdate(0, -30);
124 eventSender
.gestureScrollEnd(0, 0);
130 function secondGestureScroll()
132 debug("second gesture");
133 eventSender
.gestureScrollBegin(12, 40);
134 eventSender
.gestureScrollUpdate(0, -20);
135 eventSender
.gestureScrollUpdate(0, -25);
136 eventSender
.gestureScrollEnd(0, 0);
142 if (window
.testRunner
)
143 testRunner
.waitUntilDone();
147 movedbox
= document
.getElementById("outermostdiv");
148 touchtarget
= document
.getElementById("innerdiv");
149 touchtarget
.addEventListener("scroll", recordScroll
);
150 touchtarget
.addEventListener("mousewheel", recordWheel
);
152 if (window
.eventSender
) {
153 description('This tests that a gesture scroll is propagated from an ' +
154 'inner div to an outer div twice when the scrolled divs have no ' +
155 'remaining scroll offset.');
156 if (checkTestDependencies())
157 firstGestureScroll();
161 debug("This test requires DumpRenderTree. Gesture-scroll the page to validate the implementation.");