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