|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=378670 |
|
5 --> |
|
6 <head> |
|
7 <title>Test for Bug 378670</title> |
|
8 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
9 <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script> |
|
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
|
11 </head> |
|
12 <body> |
|
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=378670">Mozilla Bug 378670</a> |
|
14 <p id="display"></p> |
|
15 <div id="content" style="display: none"> |
|
16 |
|
17 </div> |
|
18 Clicking on the select should not crash Mozilla |
|
19 <select id="select"> |
|
20 <option>1</option> |
|
21 <option>2</option> |
|
22 </select> |
|
23 |
|
24 <pre id="test"> |
|
25 <script> |
|
26 document.body.addEventListener('popupshowing', function(e) {e.target.parentNode.removeChild(e.target) }, true); |
|
27 </script> |
|
28 <script type="application/javascript"> |
|
29 |
|
30 /** Test for Bug 378670 **/ |
|
31 |
|
32 SimpleTest.waitForExplicitFinish(); |
|
33 |
|
34 function clickit() { |
|
35 var select = document.getElementById('select'); |
|
36 |
|
37 sendMouseEvent({type:'mousedown'}, select); |
|
38 sendMouseEvent({type:'mouseup'}, select); |
|
39 sendMouseEvent({type:'click'}, select); |
|
40 |
|
41 setTimeout(finish, 200); |
|
42 } |
|
43 |
|
44 window.addEventListener('load', clickit, false); |
|
45 |
|
46 function finish() |
|
47 { |
|
48 ok(true, "This is a mochikit version of a crash test. To complete is to pass."); |
|
49 SimpleTest.finish(); |
|
50 } |
|
51 </script> |
|
52 </pre> |
|
53 </body> |
|
54 </html> |