test_bug488417.html (1299B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=488417 5 --> 6 <head> 7 <title>Test for Bug 488417</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=488417">Mozilla Bug 488417</a> 14 <div id="display"> 15 <table border="1"> 16 <tr> 17 <td id="a">A1</td> 18 <td id="b">B1</td> 19 </tr> 20 <tr> 21 <td>A2</td> 22 <td>B2</td> 23 </tr> 24 </table> 25 </div> 26 <div id="content" style="display: none"> 27 28 </div> 29 <pre id="test"> 30 <script type="application/javascript"> 31 32 function clickIt(node) { 33 synthesizeMouse(node, node.getBoundingClientRect().width/2, 34 node.getBoundingClientRect().height/2, 35 { accelKey: 1 }); 36 } 37 38 /** Test for Bug 488417 */ 39 SimpleTest.waitForExplicitFinish(); 40 41 addLoadEvent(function() { 42 // Do the test async so we can unsuppress painting 43 SimpleTest.executeSoon(function() { 44 clickIt($("a")); 45 clickIt($("b")); 46 clickIt($("a")); 47 ok(1, "Got here"); 48 // Clean up 49 window.getSelection().removeAllRanges(); 50 SimpleTest.finish(); 51 }); 52 }); 53 54 55 </script> 56 </pre> 57 </body> 58 </html>