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">
23 word-wrap: break-word
;
50 <body style=
"margin:0" onload=
"runTest();">
51 <div id=
"touchtarget">
53 <table border=
"0" cellspacing=
"0px" id=
"tablefoo">
55 <td><div id=
"redbox"></div></td>
56 <td><div id=
"greenbox"></div></td>
59 <td><div id=
"greenbox"></div></td>
60 <td><div id=
"greenbox"></div></td>
66 <p id=
"description"></p>
67 <div id=
"console"></div>
68 <script type=
"text/javascript">
71 var expectedGesturesTotal
= 2;
72 var gesturesOccurred
= 0;
73 var scrollAmountX
= ['0', '0'];
74 var scrollAmountY
= ['0', '0'];
75 var wheelEventsOccurred
= 0;
76 var expectedWheelEventsOccurred
= ['0', '0'];
77 var scrollEventsOccurred
= 0;
78 var expectedScrollEventsOccurred
= '1';
79 var scrolledElement
= 'movingdiv'
81 function firstGestureScroll()
83 debug("first gesture");
84 eventSender
.gestureScrollBegin(95, 12);
85 eventSender
.gestureScrollUpdate(-90, 0);
86 eventSender
.gestureScrollEnd(0, 0);
92 function secondGestureScroll()
94 debug("second gesture");
95 eventSender
.gestureScrollBegin(12, 97);
96 eventSender
.gestureScrollUpdate(0, -95);
97 eventSender
.gestureScrollEnd(0, 0);
103 if (window
.testRunner
)
104 testRunner
.waitUntilDone();
108 var scaleFactor
= 2.0;
109 if (window
.internals
)
110 internals
.setPageScaleFactor(scaleFactor
);
112 movingdiv
= document
.getElementById('movingbox');
113 movingdiv
.addEventListener("scroll", recordScroll
);
114 window
.addEventListener("mousewheel", recordWheel
);
116 if (window
.eventSender
&& window
.internals
) {
117 description('This tests gesture event scrolling of an overflow div with page scale.');
119 if (checkTestDependencies()) {
120 debug("set PreferCompositingToLCDTextEnabled false");
121 window
.internals
.settings
.setPreferCompositingToLCDTextEnabled(false);
122 scrollAmountX
= ['45', '45'];
123 scrollAmountY
= ['0', '47'];
124 firstGestureScroll();
126 debug("set PreferCompositingToLCDTextEnabled true");
127 window
.internals
.settings
.setPreferCompositingToLCDTextEnabled(true);
128 scrollAmountX
= ['90', '90'];
129 scrollAmountY
= ['47.5', '95'];
130 gesturesOccurred
= 0;
131 firstGestureScroll();
136 debug("This test requires DumpRenderTree. Touch scroll the red rect to log.");