Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / select / menulist-popup-crash.html
blob1ca0d9fadacddd4423853fca88d45d38a5435d5f
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 </head>
5 <body>
6 <p id="description">&lt;select> test for opening two popup menus.</p>
7 <div id="console"></div>
8 <p id="debug">PASS if the test didn't crash.</p>
9 <script>
10 if (window.testRunner)
11 testRunner.dumpAsText();
13 var parent = document.createElement('div');
14 parent.innerHTML = '<select id="sl1">'
15 + '<option>one</option>'
16 + '<option>two</option>'
17 + '<option>three</option>'
18 + '<option>four</option>'
19 + '<option>five</option>'
20 + '<option>six</option>'
21 + '<option>seven</option>'
22 + '<option>eight</option>'
23 + '<option>nine</option>'
24 + '<option>ten</option>'
25 + '<option>eleven</option>'
26 + '<option>twelve</option>'
27 + '<option>thirteen</option>'
28 + '<option>fourteen</option>'
29 + '<option>fifteen</option>'
30 + '<option>sixteen</option>'
31 + '<option>seventeen</option>'
32 + '</select>'
33 + '<select id="sl2">'
34 + '<option>one</option>'
35 + '<option>two</option>'
36 + '<option>three</option>'
37 + '</select>';
38 document.body.appendChild(parent);
40 function mouseDownOnSelect(selId)
42 var sl = document.getElementById(selId);
43 var event = document.createEvent("MouseEvent");
44 event.initMouseEvent("mousedown", true, true, document.defaultView, 1, sl.offsetLeft, sl.offsetTop, sl.offsetLeft, sl.offsetTop, false, false, false, false, 0, document);
45 sl.dispatchEvent(event);
48 mouseDownOnSelect("sl1");
49 mouseDownOnSelect("sl2");
51 </script>
52 </body>
53 </html>