| <script> |
| function test() |
| { |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| var select = document.getElementById("select"); |
| var rect = select.getBoundingClientRect(); |
| var x = rect.left + 10; |
| var y = rect.top + 10; |
| |
| if (window.eventSender) { |
| eventSender.mouseMoveTo(x, y); |
| eventSender.mouseDown(0); |
| } |
| } |
| function reportFocus() |
| { |
| document.getElementById("result").innerHTML = "PASS"; |
| } |
| </script> |
| <body onload="test()"> |
| <p>The select below should be focused because we dispatched a mouse down event to it.</p> |
| <p id="result">FAIL</p> |
| <select id="select" size="4" onfocus="reportFocus()"> |
| <option>one</option> |
| <option>two</option> |
| <option>three</option> |
| <option>four</option> |
| </select> |
| </body> |