|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=858459 |
|
5 --> |
|
6 <head> |
|
7 <meta charset="utf-8"> |
|
8 <title>Test for Bug 858459</title> |
|
9 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
10 <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script> |
|
11 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
|
12 <script type="application/javascript"> |
|
13 |
|
14 /** Test for Bug 858459 **/ |
|
15 |
|
16 var result = ""; |
|
17 var timeout = null; |
|
18 var clicks = 0; |
|
19 const EXPECTED_RESULT = "change select"; |
|
20 |
|
21 function logEvent(ev,msg) { |
|
22 result += ev.type + ' ' + msg; |
|
23 ++clicks; |
|
24 if (result.length > EXPECTED_RESULT.length) |
|
25 finishTest(); |
|
26 } |
|
27 |
|
28 document.onclick = function(event) { logEvent(event,"document"); } |
|
29 |
|
30 SimpleTest.waitForExplicitFinish(); |
|
31 |
|
32 function finishTest() { |
|
33 if (!timeout) return; |
|
34 clearTimeout(timeout); |
|
35 timeout = null; |
|
36 is(result,EXPECTED_RESULT,""); |
|
37 SimpleTest.finish(); |
|
38 } |
|
39 |
|
40 function runTest() { |
|
41 // Need a timeout to check that an event has _not_ occurred. |
|
42 timeout = setTimeout(finishTest, 5000); |
|
43 synthesizeMouseAtCenter(document.getElementById('test858459'), { }); |
|
44 } |
|
45 |
|
46 </script> |
|
47 </head> |
|
48 <body onload="SimpleTest.waitForFocus(runTest)"> |
|
49 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=858459">Mozilla Bug 858459</a> |
|
50 <p id="display"></p> |
|
51 <div id="content" style="display: none"> |
|
52 |
|
53 </div> |
|
54 <pre id="test"><div><select id="test858459" size=4 onclick="logEvent(event,'select');" onchange="logEvent(event,'select');var div = document.querySelector('#test div'); div.innerHTML='<p>'+div.innerHTML; document.body.offsetHeight;"><option>1111111111111111<option>2<option>3</select></div> |
|
55 |
|
56 </pre> |
|
57 </body> |
|
58 </html> |