4 <script src=
"../../../../resources/js-test.js"></script>
5 <script src=
"resources/gesture-helpers.js"></script>
6 <style type=
"text/css">
28 <iframe id=
"touchtarget" src=
"resources/scroll-inside-editable-iframe.html"></iframe>
30 <p id=
"description"></p>
31 <div id=
"console"></div>
32 <script type=
"text/javascript">
35 var expectedGesturesTotal
= 2;
36 var gesturesOccurred
= 0;
37 var scrollAmountX
= ['0', '0'];
38 var scrollAmountY
= ['140', '200'];
39 var wheelEventsOccurred
= 0;
40 var expectedWheelEventsOccurred
= ['0', '0'];
41 var scrollEventsOccurred
= 0;
42 var expectedScrollEventsOccurred
= '1';
43 var scrolledElement
= 'touchtarget.contentDocument.scrollingElement'
45 function firstGestureScroll()
47 debug("first gesture");
48 eventSender
.gestureScrollBegin(12, 150);
49 eventSender
.gestureScrollUpdate(0, -140);
50 eventSender
.gestureScrollEnd(0, 0);
56 function secondGestureScroll()
58 debug("second gesture");
59 eventSender
.gestureScrollBegin(12, 110);
60 eventSender
.gestureScrollUpdate(0, -60);
61 eventSender
.gestureScrollEnd(0, 0);
67 if (window
.testRunner
)
68 testRunner
.waitUntilDone();
72 touchtarget
= document
.getElementById('touchtarget');
73 touchtarget
.contentDocument
.addEventListener("scroll", recordScroll
);
74 touchtarget
.contentDocument
.body
.addEventListener("mousewheel", recordWheel
);
76 if (window
.eventSender
) {
77 description('This tests gesture event scrolling of an iframe in an overflow div. ' +
78 'Red-green strip is scrolled on pass.');
79 if (checkTestDependencies())
84 debug("This test requires DumpRenderTree. Touch-scroll the red/green strip.");