<!DOCTYPE html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<style>
#abs {
position: absolute;
top: 0px;
left: 0px;
visibility: hidden;
}
#abs-inner {
width: 96px;
height: 96px;
display: inline-block;
border-radius: 50%;
}
</style>
<span id="inner"> Mouse over me! </span>
<div id="abs"><div id="abs-inner"></div></div>
<div id="log"></div>
<script>
test(function(t)
{
var element = document.getElementById("inner");
var x = element.offsetLeft + element.offsetWidth / 2;
var y = element.offsetTop + element.offsetHeight / 2;
var element = document.elementFromPoint(x, y);
assert_equals(element.nodeName, 'SPAN');
assert_equals(element.id, 'inner');
}, "elementFromPoint should return an visible element under a point");
</script>