1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../../../../resources/js-test.js"></script>
5 <script src=
"resources/gesture-helpers.js"></script>
6 <style type=
"text/css">
22 <iframe id=
"touchtarget" src=
"resources/scroll-inside-iframe.html"></iframe>
23 <p id=
"description"></p>
24 <div id=
"console"></div>
25 <script type=
"text/javascript">
28 var expectedGesturesTotal
= 2;
29 var gesturesOccurred
= 0;
30 var scrollAmountX
= ['0', '0'];
31 var scrollAmountY
= ['140', '200'];
32 var wheelEventsOccurred
= 0;
33 var expectedWheelEventsOccurred
= ['0', '0'];
34 var scrollEventsOccurred
= 0;
35 var expectedScrollEventsOccurred
= '1';
36 var scrolledElement
= 'touchtarget.contentDocument.scrollingElement'
38 function firstGestureScroll()
40 debug("first gesture");
41 eventSender
.gestureScrollBegin(12, 150);
42 eventSender
.gestureScrollUpdate(0, -140);
43 eventSender
.gestureScrollEnd(0, 0);
49 function secondGestureScroll()
51 debug("second gesture");
52 eventSender
.gestureScrollBegin(12, 110);
53 eventSender
.gestureScrollUpdate(0, -60);
54 eventSender
.gestureScrollEnd(0, 0);
60 if (window
.testRunner
)
61 testRunner
.waitUntilDone();
65 touchtarget
= document
.getElementById('touchtarget');
66 touchtarget
.contentDocument
.addEventListener("scroll", recordScroll
);
67 touchtarget
.contentDocument
.body
.addEventListener("mousewheel", recordWheel
);
69 if (window
.eventSender
) {
70 description('This tests gesture event scrolling in iframes. ' +
71 'Red-green strip is scrolled on pass.');
72 if (checkTestDependencies())
77 debug("This test requires DumpRenderTree . Touch-scroll the red/green strip.");