test_bug623291.html (1116B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=623291 5 --> 6 <head> 7 <title>Test for Bug 623291</title> 8 <script src="/tests/SimpleTest/SimpleTest.js"></script> 9 <script 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=623291">Mozilla Bug 623291</a> 14 <p id="display"></p> 15 <div id="content" style="display: none"> 16 17 </div> 18 <input id="textField" onfocus="next()" onblur="done();"> 19 <button id="b">a button</button> 20 21 <pre id="test"> 22 <script type="application/javascript"> 23 24 /** Test for Bug 623291 */ 25 26 function runTest() { 27 document.getElementById("textField").focus(); 28 } 29 30 function next() { 31 synthesizeMouseAtCenter(document.getElementById('b'), {}, window); 32 } 33 34 function done() { 35 isnot(document.activeElement, document.getElementById("textField"), 36 "TextField should not be active anymore!"); 37 SimpleTest.finish(); 38 } 39 40 SimpleTest.waitForExplicitFinish(); 41 SimpleTest.waitForFocus(runTest); 42 43 </script> 44 </pre> 45 </body> 46 </html>