Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / select-change-popup-to-listbox-in-event-handler.html
bloba2722b3ebbd5edda93125e9b8664a394b9d2b8c4
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();
9 function sendClick()
11 var select = document.getElementById("select");
12 var rect = select.getBoundingClientRect();
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, null);
18 select.dispatchEvent(evt);
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>