Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / textarea-arrow-navigation.html
blobeeff6c22c41f5ccfb9e6d35e1ed37f87a11102f4
1 <html>
2 <head>
3 <script>
5 function log(str)
7 var li = document.createElement("li");
8 li.appendChild(document.createTextNode(str));
9 var console = document.getElementById("console");
10 console.appendChild(li);
13 function runTest()
15 if (window.testRunner)
16 testRunner.dumpAsText();
18 if (!window.eventSender)
19 return;
21 var textarea = document.getElementById("test");
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
25 // numbered lines:
26 textarea.setSelectionRange(5, 5);
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 the text area
29 eventSender.keyDown("downArrow");
31 if (textarea.selectionStart != textarea.value.length)
32 log("Fail. Expected: selectionStart == " + textarea.value.length + ", Found: " + textarea.selectionStart);
33 else
34 log("Success");
37 </script>
39 </head>
40 <body onload="runTest()">
41 <p>
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
44 </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
47 </p>
48 <textarea id="test" rows="10" cols="80">What steps will reproduce the problem?
49 1.
50 2.
51 3.
53 What is the expected output? What do you see instead?</textarea>
55 <ul id="console"></ul>
57 </body>
58 </html>