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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/space-scroll-textinput-canceled.html

Issue 2100243002: Remove non-standardize key code names from event_sender. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix inspector tests that were missed by sed Created 4 years, 5 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 <style type="text/css"> 5 <style type="text/css">
6 ::-webkit-scrollbar { 6 ::-webkit-scrollbar {
7 width: 0px; 7 width: 0px;
8 height: 0px; 8 height: 0px;
9 } 9 }
10 </style> 10 </style>
(...skipping 12 matching lines...) Expand all
23 var txt = document.getElementById('txt'); 23 var txt = document.getElementById('txt');
24 txt.addEventListener('textInput', function(e) { 24 txt.addEventListener('textInput', function(e) {
25 if (e.data === ' ') { 25 if (e.data === ' ') {
26 e.preventDefault(); 26 e.preventDefault();
27 } 27 }
28 }, false); 28 }, false);
29 29
30 function focusAndPressSpace() 30 function focusAndPressSpace()
31 { 31 {
32 document.getElementById('txt').focus(); 32 document.getElementById('txt').focus();
33 // Leave some space for pageUp 33 // Leave some space for PageUp
34 document.scrollingElement.scrollTop = window.innerHeight / 2; 34 document.scrollingElement.scrollTop = window.innerHeight / 2;
35 35
36 eventSender.keyDown("pageUp", []); 36 eventSender.keyDown("PageUp", []);
37 // Space key shouldn't cancel pageUp 37 // Space key shouldn't cancel PageUp
38 eventSender.keyDown(" ", []); 38 eventSender.keyDown(" ", []);
39 39
40 // pageUp should finish 40 // PageUp should finish
41 shouldBecomeEqual("document.scrollingElement.scrollTop", "0", finishJSTest); 41 shouldBecomeEqual("document.scrollingElement.scrollTop", "0", finishJSTest);
42 } 42 }
43 43
44 jsTestIsAsync = true; 44 jsTestIsAsync = true;
45 45
46 function runTest() 46 function runTest()
47 { 47 {
48 if (window.eventSender) { 48 if (window.eventSender) {
49 focusAndPressSpace(); 49 focusAndPressSpace();
50 } 50 }
51 } 51 }
52 </script> 52 </script>
53 53
54 </body> 54 </body>
55 </html> 55 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698