summaryrefslogtreecommitdiffstats
path: root/layout/tables/test/test_bug541668_table_event_delivery.html
blob: 902b4c140d4256df89b5490a44dbbd078c3fba80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=541668
-->
<head>
  <title>Test for Bug 541668</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <script src="/tests/SimpleTest/EventUtils.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=541668">Mozilla Bug 541668</a>
<table id="display">
  <tr>
    <td rowspan="2">
      <div id="target" style="background:fuchsia;height:200px;width:200px"></div>
    </td>
    <td>Cell</td>
  </tr>
  <tr>
    <td>Cell</td>
  </tr>
</table>
<pre id="test">
<script type="application/javascript">

/** Test for Bug 541668 **/

SimpleTest.waitForExplicitFinish();
SimpleTest.waitForFocus(run_test);

function run_test()
{
  var target = document.getElementById("target");

  var got_mousemove = false;
  target.addEventListener("mousemove",
                          function(event) { got_mousemove = true });
  synthesizeMouse(target, 150, 150, { type: "mousemove" });
  is(got_mousemove, true, "should get mousemove on block");
  SimpleTest.finish();
}

</script>
</pre>
</body>
</html>