blob: 8a2942fd24d59f638332116782c892235ac321f1 [file] [log] [blame]
<!doctype html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<style>
img {
background-color:red;
border-radius: 50px;
}
</style>
<img id="roundedImg" src="none" width="100px" height="100px" />
<div id="log"></div>
<script>
test(function(t)
{
var element = document.getElementById("roundedImg");
var x = element.offsetLeft + element.offsetWidth - 2;
var y = element.offsetTop + element.offsetHeight - 2;
var element = document.elementFromPoint(x, y);
assert_equals(element.nodeName, 'BODY');
}, "elementFromPoint should return an element under a point that is clipped to a border-radius");
</script>