layout/forms/test/test_bug476308.html
author Karl Tomlinson <karlt+@karlt.net>
Tue, 17 Apr 2012 13:00:25 +1200
changeset 91816 8bea9978c445a4a6dac7f2d05796e113746ce863
parent 74315 1188456710819d4606e74396be333ead9fe63261
child 504240 c4511a175f2f5aa7154ac22246570de1116a2875
permissions -rw-r--r--
b=497498 use event coordinates for source drag end point instead of new cursor position r=roc

<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=476308
-->
<head>
  <title>Test for Bug 345267</title>
  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>

<button style="-moz-appearance: none; width: 100px; height: 60px; background-color: red; border: 2px solid green; box-shadow: 30px 0px 3.5px black; position: absolute; top: 300px; left: 20px;"
        id="button1">1</button>

<br />
<div style="width: 100px; height: 100px; background-color: green; border: 3px dotted blue; box-shadow: -30px -20px 0px black; position: absolute; top: 500px; left: 70px;"
     id="div1">2</div>

<script type="text/javascript">
  var elem = document.elementFromPoint(130, 310);
  isnot(elem, document.getElementById("button1"), "button1's box-shadow is receiving events when it shouldn't");

  elem = document.elementFromPoint(50, 500);
  isnot(elem, document.getElementById("div1"), "div1's box-shadow is receiving events when it shouldn't");
</script>

</body>
</html>