1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../../../../resources/js-test.js"></script>
5 <style type=
"text/css">
7 background-color: #ccc;
12 ::-webkit-scrollbar-button
{
16 ::-webkit-scrollbar-thumb
{
17 background-color: #777;
28 <body onload=
"runTest();">
30 Attack your ankles catnip leap hiss chase the red dot, zzz run run I don't like
31 that food puking eat feed me. Attack shed everywhere sleep on your face
32 scratched bat sleep on your keyboard, chase the red dot attack your ankles
33 attack biting eat the grass bat. Sunbathe chase the red dot eat the grass
34 attack sleep on your face rip the couch, toss the mousie sleep in the sink lick
35 climb the curtains. I don't like that food meow climb the curtains toss the
36 mousie tail flick stuck in a tree, judging you toss the mousie stretching
37 hairball biting attack. Give me fish eat judging you claw, eat biting I don't
38 like that food toss the mousie catnip sleep in the sink toss the mousie purr.
39 Sniff sleep on your keyboard eat the grass lick, rip the couch give me fish leap
40 bat shed everywhere knock over the lamp jump on the table toss the mousie.
43 <script type=
"text/javascript">
47 function verticalScrollTest() {
48 textArea
= document
.getElementById('text');
49 var scrollbarX
= textArea
.offsetLeft
+ textArea
.offsetWidth
- 5;
50 var scrollThumbSafeOffset
= 20;
51 var scrollbarY
= textArea
.offsetTop
+ scrollThumbSafeOffset
;
53 // Ensure we use a touch with an area to test under touch adjustment
57 eventSender
.gestureTapDown(
58 scrollbarX
, scrollbarY
, touchWidth
, touchHeight
);
59 shouldBe('textArea.scrollTop', '0');
60 eventSender
.gestureShowPress(
61 scrollbarX
, scrollbarY
, touchWidth
, touchHeight
);
62 eventSender
.gestureScrollBegin(
63 scrollbarX
, scrollbarY
, touchWidth
, touchHeight
);
64 eventSender
.gestureScrollUpdate(0, 20);
65 eventSender
.gestureScrollEnd(0, 0);
66 shouldBeGreaterThanOrEqual('textArea.scrollTop', '1');
68 // If we've got here, we've passed.
69 isSuccessfullyParsed();
72 function exitIfNecessary()
74 debug('Gesture events not implemented on this platform or broken');
75 isSuccessfullyParsed();
80 internals
.settings
.setMockScrollbarsEnabled(true);
81 if (window
.eventSender
) {
83 'This tests scroll gesture events on a textarea scrollbar. ' +
84 'The textarea below should be slightly scrolled down ' +
87 if (eventSender
.clearTouchPoints
)
92 debug("This test requires DumpRenderTree.");