OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <title>Pan Scrolling Test</title> | 3 <style type="text/css"> |
4 </head> | 4 #scrollable { |
5 <body> | 5 width:500px; |
6 <script> | 6 height:300px; |
7 if (testRunner) { | 7 overflow:auto; |
8 testRunner.dumpAsText(); | 8 border:2px solid red; |
9 testRunner.waitUntilDone(); | 9 padding:10px"; |
10 } | 10 } |
11 </script> | 11 </style> |
12 <div id="overflow" style="width:500px; height:300px; overflow:auto; bord
er:2px solid red; padding:10px"> | 12 <script src="../js/resources/js-test-pre.js"></script> |
13 <div style="height:200px; position:relative;"> | 13 <script src="./resources/panScroll.js"></script> |
14 <div style="height:150px; border:1px blue solid; overflow:auto;"
> | 14 <script> |
15 Panscrolling starting in the blue box should scroll the oute
r div. | 15 function start() |
16 </div> | 16 { |
17 Panscrolling outside the blue boxes should scroll the outer div. | 17 description('Check pan scroll in nested divs'); |
18 </div> | 18 testPanScroll({ |
19 <div style="height:200px; position:relative;"> | 19 'clickOrDrag': 'click', |
20 <div style="height:150px; border:1px blue solid; overflow:auto;"
> | 20 'scrollable': $('scrollable'), |
21 Panscrolling starting in the blue box should scroll the oute
r div. | 21 }); |
22 </div> | 22 } |
23 </div> | 23 </script> |
| 24 </head> |
| 25 <body onload="start()"> |
| 26 <div id="container"> |
| 27 <p id="description"></p> |
| 28 Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=28023">bug 28023</a> T
his tests that pan scrolling |
| 29 propogates correctly up the DOM tree. On success, our scroll offset should be no
n-zero. |
| 30 <div id="scrollable"> |
| 31 <div style="height:200px; position:relative;"> |
| 32 <div style="height:150px; border:1px blue solid; overflow:auto;"> |
| 33 Panscrolling starting in the blue box should scroll the outer div. |
24 </div> | 34 </div> |
25 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=28023">bug
28023</a> This tests that pan scrolling | 35 Panscrolling outside the blue boxes should scroll the outer div. |
26 propogates correctly up the DOM tree. On success, our scroll offset shou
ld be non-zero.</p> | 36 </div> |
27 <div id="console"></div> | 37 <div style="height:200px; position:relative;"> |
28 <script> | 38 <div style="height:150px; border:1px blue solid; overflow:auto;"> |
29 if (eventSender) | 39 Panscrolling starting in the blue box should scroll the outer div. |
30 { | 40 </div> |
31 eventSender.mouseMoveTo(50, 50); | 41 </div> |
32 eventSender.mouseDown(1); | 42 </div> |
33 eventSender.mouseUp(1); | 43 </div> |
34 eventSender.mouseMoveTo(50, 200); | 44 <div id="console"></div> |
35 setTimeout(finished, 500); | 45 <script src="../js/resources/js-test-post.js"></script> |
36 } | 46 </body> |
37 | |
38 function finished() | |
39 { | |
40 if (document.getElementById('overflow').scrollTop) | |
41 document.getElementById('console').innerHTML = "Success! Div
with overflow was scrolled"; | |
42 else | |
43 document.getElementById('console').innerHTML = "Fail! Div wi
th overflow was not scrolled"; | |
44 | |
45 window.testRunner.notifyDone(); | |
46 } | |
47 </script> | |
48 </body> | |
49 </html> | 47 </html> |
OLD | NEW |