1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/tables/test/test_bug541668_table_event_delivery.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,49 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=541668 1.8 +--> 1.9 +<head> 1.10 + <title>Test for Bug 541668</title> 1.11 + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.12 + <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script> 1.13 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 1.14 +</head> 1.15 +<body> 1.16 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=541668">Mozilla Bug 541668</a> 1.17 +<table id="display"> 1.18 + <tr> 1.19 + <td rowspan="2"> 1.20 + <div id="target" style="background:fuchsia;height:200px;width:200px"></div> 1.21 + </td> 1.22 + <td>Cell</td> 1.23 + </tr> 1.24 + <tr> 1.25 + <td>Cell</td> 1.26 + </tr> 1.27 +</table> 1.28 +<pre id="test"> 1.29 +<script type="application/javascript"> 1.30 + 1.31 +/** Test for Bug 541668 **/ 1.32 + 1.33 +SimpleTest.waitForExplicitFinish(); 1.34 +SimpleTest.waitForFocus(run_test); 1.35 + 1.36 +function run_test() 1.37 +{ 1.38 + var target = document.getElementById("target"); 1.39 + 1.40 + var got_mousemove = false; 1.41 + target.addEventListener("mousemove", 1.42 + function(event) { got_mousemove = true }, 1.43 + false); 1.44 + synthesizeMouse(target, 150, 150, { type: "mousemove" }); 1.45 + is(got_mousemove, true, "should get mousemove on block"); 1.46 + SimpleTest.finish(); 1.47 +} 1.48 + 1.49 +</script> 1.50 +</pre> 1.51 +</body> 1.52 +</html>