summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/select/click-size-zero-no-crash.html
blob: 321b30e9ab44889246932b39669c9a0a3f9f4780 (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
<html>
<script src="../../resources/js-test.js"></script>
<script>
function getCenterFor(element)
{
  var rect = element.getBoundingClientRect();
  return { x : parseInt((rect.left + rect.right) / 2) , y : parseInt((rect.top + rect.bottom) / 2)};
}

function runTest()
{
  if (!window.testRunner)
    return;
  if (!window.eventSender)
    return;

  testRunner.dumpAsText();
  center = getCenterFor(document.getElementById("emptyselect"));
  eventSender.mouseMoveTo(center.x, center.y);
  eventSender.mouseDown();
  eventSender.mouseUp();
  eventSender.keyDown("downArrow");
}

</script>
<style>
</style>
<body onload="runTest();">
<select multiple id="emptyselect"></select>
This should not crash
</body>
</html>