ap@webkit.org | 9a9292d | 2009-03-17 17:57:28 +0000 | [diff] [blame] | 1 | <body><form> |
| 2 | <select multiple size=5 onchange="change()"><option>1</option><option>2</option></select> |
| 3 | </form> |
| 4 | <div id=res></div> |
| 5 | <script> |
| 6 | |
| 7 | var select = document.forms[0].elements[0]; |
| 8 | var res = document.getElementById("res"); |
| 9 | select.focus(); |
rniwa@webkit.org | ea3cf92 | 2012-06-22 06:52:33 +0000 | [diff] [blame] | 10 | if (window.testRunner) { |
| 11 | testRunner.dumpAsText(); |
ap@webkit.org | 9a9292d | 2009-03-17 17:57:28 +0000 | [diff] [blame] | 12 | eventSender.keyDown("downArrow", []); |
| 13 | eventSender.keyDown("downArrow", ["shiftKey"]); |
| 14 | } else { |
| 15 | res.textContent = "Press down arrow."; |
| 16 | } |
| 17 | |
| 18 | function change() { |
| 19 | if (select.firstChild.selected && !select.firstChild.nextSibling.selected) { |
| 20 | select.appendChild(new Option("3", "3", false, false)); |
| 21 | res.textContent = "Press shift + down arrow."; |
| 22 | } else if (select.firstChild.selected && select.firstChild.nextSibling.selected && !select.lastChild.selected) |
| 23 | res.textContent = "Success."; |
| 24 | else |
| 25 | res.textContent = "Failed."; |
| 26 | } |
| 27 | </script> |