OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <style type="text/css"> | 3 <style type="text/css"> |
4 #draggable { | 4 #draggable { |
5 padding: 5pt; | 5 padding: 5pt; |
6 border: 3px solid #00cc00; | 6 border: 3px solid #00cc00; |
7 background: #00cccc; | 7 background: #00cccc; |
8 width: 80px; | 8 width: 80px; |
9 cursor: hand; | 9 cursor: hand; |
10 } | 10 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 var retryCount = 0; | 44 var retryCount = 0; |
45 var lastScrollTop = 0; | 45 var lastScrollTop = 0; |
46 | 46 |
47 function checkScrolled() | 47 function checkScrolled() |
48 { | 48 { |
49 if (scrollable.scrollTop > 0) { | 49 if (scrollable.scrollTop > 0) { |
50 testPassed('scrollable.scrollTop > 0'); | 50 testPassed('scrollable.scrollTop > 0'); |
51 lastScrollTop = scrollable.scrollTop; | 51 lastScrollTop = scrollable.scrollTop; |
52 // Cancel drag and drop by ESC key. | 52 // Cancel drag and drop by ESC key. |
53 eventSender.keyDown('\x1B'); | 53 eventSender.keyDown('escape'); |
54 retryCount = 0; | 54 retryCount = 0; |
55 window.setTimeout(checkStopped, 50); | 55 window.setTimeout(checkStopped, 50); |
56 return; | 56 return; |
57 } | 57 } |
58 | 58 |
59 ++retryCount; | 59 ++retryCount; |
60 if (retryCount > 10) { | 60 if (retryCount > 10) { |
61 testFailed('No autoscroll'); | 61 testFailed('No autoscroll'); |
62 finishTest(); | 62 finishTest(); |
63 return; | 63 return; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 </div> | 117 </div> |
118 </div> | 118 </div> |
119 <div id="console"></div> | 119 <div id="console"></div> |
120 <script src="../../resources/js-test.js"></script> | 120 <script src="../../resources/js-test.js"></script> |
121 <script> | 121 <script> |
122 description('Check autoscroll by drag-and-drop'); | 122 description('Check autoscroll by drag-and-drop'); |
123 setUpTest(); | 123 setUpTest(); |
124 </script> | 124 </script> |
125 </body> | 125 </body> |
126 </html> | 126 </html> |
OLD | NEW |