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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-arrow-navigation.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 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script>
4 4
5 function log(str) 5 function log(str)
6 { 6 {
7 var li = document.createElement("li"); 7 var li = document.createElement("li");
8 li.appendChild(document.createTextNode(str)); 8 li.appendChild(document.createTextNode(str));
9 var console = document.getElementById("console"); 9 var console = document.getElementById("console");
10 console.appendChild(li); 10 console.appendChild(li);
11 } 11 }
12 12
13 function runTest() 13 function runTest()
14 { 14 {
15 if (window.testRunner) 15 if (window.testRunner)
16 testRunner.dumpAsText(); 16 testRunner.dumpAsText();
17 17
18 if (!window.eventSender) 18 if (!window.eventSender)
19 return; 19 return;
20 20
21 var textarea = document.getElementById("test"); 21 var textarea = document.getElementById("test");
22 22
23 // set the cursor several characters into the first line of the text area so 23 // set the cursor several characters into the first line of the text area so
24 // that when you go down by a line, the cursor will be at the end of the 24 // that when you go down by a line, the cursor will be at the end of the
25 // numbered lines: 25 // numbered lines:
26 textarea.setSelectionRange(5, 5); 26 textarea.setSelectionRange(5, 5);
27 for (var i = 0; i < 10; i++) { 27 for (var i = 0; i < 10; i++) {
28 // press the 'down arrow' a bunch of times to try to get to the end of t he text area 28 // press the 'down arrow' a bunch of times to try to get to the end of t he text area
29 eventSender.keyDown("downArrow"); 29 eventSender.keyDown("ArrowDown");
30 } 30 }
31 if (textarea.selectionStart != textarea.value.length) 31 if (textarea.selectionStart != textarea.value.length)
32 log("Fail. Expected: selectionStart == " + textarea.value.length + ", F ound: " + textarea.selectionStart); 32 log("Fail. Expected: selectionStart == " + textarea.value.length + ", F ound: " + textarea.selectionStart);
33 else 33 else
34 log("Success"); 34 log("Success");
35 } 35 }
36 36
37 </script> 37 </script>
38 38
39 </head> 39 </head>
40 <body onload="runTest()"> 40 <body onload="runTest()">
41 <p> 41 <p>
42 This tests that the cursor doesn't get 'stuck' when advancing through a 42 This tests that the cursor doesn't get 'stuck' when advancing through a
43 text area with the down arrow key. See bug #19465 for more information 43 text area with the down arrow key. See bug #19465 for more information
44 </p> 44 </p>
45 <p> 45 <p>
46 If the test is successful and the cursor is at the end of the textarea, you should see the word 'Success' printed below 46 If the test is successful and the cursor is at the end of the textarea, you should see the word 'Success' printed below
47 </p> 47 </p>
48 <textarea id="test" rows="10" cols="80">What steps will reproduce the problem? 48 <textarea id="test" rows="10" cols="80">What steps will reproduce the problem?
49 1. 49 1.
50 2. 50 2.
51 3. 51 3.
52 52
53 What is the expected output? What do you see instead?</textarea> 53 What is the expected output? What do you see instead?</textarea>
54 54
55 <ul id="console"></ul> 55 <ul id="console"></ul>
56 56
57 </body> 57 </body>
58 </html> 58 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698