3 <style type=
"text/css">
6 border: 3px solid
#00cc00;
15 border: solid
3px #cc0000;
20 function $(id
) { return document
.getElementById(id
); }
21 var MIDDLE_BUTTON
= 1;
22 var PAN_SCROLL_RADIUS
= 15; // from FrameView::noPanScrollRadius
26 var scrollable
= $('scrollable');
27 for (var i
= 0; i
< 10; ++i
) {
28 var line
= document
.createElement('div');
29 line
.innerHTML
= "line " + i
;
30 scrollable
.appendChild(line
);
33 if (!window
.eventSender
)
36 // Start pan scroll by click
37 eventSender
.mouseMoveTo(scrollable
.offsetLeft
+ 5, scrollable
.offsetTop
+ 5);
38 eventSender
.mouseDown(MIDDLE_BUTTON
);
39 eventSender
.mouseUp(MIDDLE_BUTTON
);
41 // Stop pan scroll by click
42 eventSender
.mouseDown(MIDDLE_BUTTON
);
43 eventSender
.mouseUp(MIDDLE_BUTTON
);
48 You should run this test in DRT.
50 For manual testing, hold middle button in scrollable and move aroudn mouse pointer for scrolling, then release middle button to stop scrolling.
51 You won't see pan icon after pan scroll.