4 <script src=
"../../../../resources/js-test.js"></script>
5 <script src=
"resources/gesture-helpers.js"></script>
6 <style type=
"text/css">
57 <body style=
"margin:0" onload=
"runTest();">
60 <table border=
"0" cellspacing=
"0px" >
63 <table border=
"0" cellspacing=
"0px" >
64 <tr><td><div id=
"greenbox"></div></td></tr>
65 <tr><td><div id=
"redbox"></div></td></tr>
66 <tr><td><div id=
"greenbox"></div></td></tr>
67 <tr><td><div id=
"redbox"></div></td></tr>
72 <div id=
"bluebox"></div>
77 <p id=
"description"></p>
78 <div id=
"console"></div>
79 <script type=
"text/javascript">
83 var expectedGesturesTotal
= 2;
84 var gesturesOccurred
= 0;
85 var scrollAmountX
= ['0', '0'];
86 var scrollAmountY
= ['0', '0'];
87 var wheelEventsOccurred
= 0;
88 var expectedWheelEventsOccurred
= ['0', '0'];
89 var scrollEventsOccurred
= 0;
90 var scrolledElement
= 'movedbox';
91 var scrollEventsOccurred
= 0;
92 var expectedScrollEventsOccurred
= '1';
94 function firstGestureScroll()
96 debug("first gesture");
97 eventSender
.gestureScrollBegin(10, 72);
98 eventSender
.gestureScrollUpdate(0, -150, true);
99 eventSender
.gestureScrollEnd(0, 0);
105 function secondGestureScroll()
107 debug("second gesture");
108 eventSender
.gestureScrollBegin(12, 40);
109 eventSender
.gestureScrollUpdate(0, -50, true);
110 eventSender
.gestureScrollUpdate(0, -10, true);
111 eventSender
.gestureScrollEnd(0, 0);
117 if (window
.testRunner
)
118 testRunner
.waitUntilDone();
122 movedbox
= document
.getElementById("outerdiv");
123 touchtarget
= document
.getElementById("innerdiv");
124 touchtarget
.addEventListener("scroll", recordScroll
);
125 touchtarget
.addEventListener("mousewheel", recordWheel
);
127 if (window
.eventSender
) {
128 description('This tests that a gesture scroll is not propagated from an ' +
129 'inner div to an outer div when the inner div has no ' +
130 'remaining scroll offset when the preventPropagation flag is set for ' +
131 'the GestureScrollUpdate event type.');
132 if (checkTestDependencies() && window
.eventSender
.gestureScrollUpdate
)
133 firstGestureScroll();
137 debug("This test requires DumpRenderTree. Gesture-scroll the page to validate the implementation.");