OLD | NEW |
| (Empty) |
1 <!DOCTYPE> | |
2 <html> | |
3 <head> | |
4 <title>Change popup to list inside mouse event handler.</title> | |
5 <script type="text/javascript" charset="utf-8"> | |
6 if (window.testRunner) | |
7 testRunner.dumpAsText(); | |
8 | |
9 function sendClick() | |
10 { | |
11 var select = document.getElementById("select"); | |
12 var rect = select.getBoundingClientRect(); | |
13 | |
14 var evt = document.createEvent("MouseEvents"); | |
15 evt.initMouseEvent("mousedown", true, true, window, | |
16 0, 0, 0, rect.top + 4, rect.left + 4, false, false, false, false, 0, nul
l); | |
17 | |
18 select.dispatchEvent(evt); | |
19 } | |
20 | |
21 window.addEventListener('load', sendClick, false); | |
22 </script> | |
23 </head> | |
24 <body> | |
25 <p>This test should not crash.</p> | |
26 <select id="select" onFocus="this.size = 10"> | |
27 <option value="0">One</option> | |
28 <option value="1">Two</option> | |
29 <option value="2">Three</option> | |
30 </select> | |
31 </body> | |
32 </html> | |
OLD | NEW |