test_bug541668_table_event_delivery.html (1191B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=541668 5 --> 6 <head> 7 <title>Test for Bug 541668</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=541668">Mozilla Bug 541668</a> 14 <table id="display"> 15 <tr> 16 <td rowspan="2"> 17 <div id="target" style="background:fuchsia;height:200px;width:200px"></div> 18 </td> 19 <td>Cell</td> 20 </tr> 21 <tr> 22 <td>Cell</td> 23 </tr> 24 </table> 25 <pre id="test"> 26 <script type="application/javascript"> 27 28 /** Test for Bug 541668 */ 29 30 SimpleTest.waitForExplicitFinish(); 31 SimpleTest.waitForFocus(run_test); 32 33 function run_test() 34 { 35 var target = document.getElementById("target"); 36 37 var got_mousemove = false; 38 target.addEventListener("mousemove", 39 function(event) { got_mousemove = true }); 40 synthesizeMouse(target, 150, 150, { type: "mousemove" }); 41 is(got_mousemove, true, "should get mousemove on block"); 42 SimpleTest.finish(); 43 } 44 45 </script> 46 </pre> 47 </body> 48 </html>