Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Side by Side Diff: LayoutTests/fast/events/drag-and-drop-autoscroll.html

Issue 484353004: Test tidying: use "escape" and "backspace" with eventSender.keyDown() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: More quoting consistency wibbles Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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>
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/HTMLDialogElement/dialog-canceling.html ('k') | LayoutTests/fast/events/key-events-in-input-text.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698