Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/inline-block/hittest-child-of-inlineblock.html |
| diff --git a/third_party/WebKit/LayoutTests/fast/inline-block/hittest-child-of-inlineblock.html b/third_party/WebKit/LayoutTests/fast/inline-block/hittest-child-of-inlineblock.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ca2051c877445e45d9e45c7906585aed826aeaa4 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fast/inline-block/hittest-child-of-inlineblock.html |
| @@ -0,0 +1,33 @@ |
| +<!DOCTYPE html> |
|
pdr.
2016/03/31 04:20:11
Can you move these test under hittesting?
i.e.:
h
Miyoung Shin(c)
2016/04/03 14:39:25
Done.
|
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<style> |
| +#roundedDiv { |
| + width: 200px; |
| + height: 200px; |
| + border-radius: 5px; |
| + border: 5px solid transparent; |
| + display: inline-block; |
| +} |
| +#roundedDivChild { |
| + width: 200px; |
| + height: 100px; |
| + margin-left: 400px; |
| +} |
| +</style> |
| +<div id="roundedDiv"> |
| +<div id="roundedDivChild">Mouse over me!<br>The box should turn green.</div> |
| +</div> |
| +<div id="log"></div> |
| +<script> |
| +test(function(t) |
| +{ |
| + var element = document.getElementById("roundedDivChild"); |
| + var x = element.offsetLeft + element.offsetWidth / 2; |
| + var y = element.offsetTop + element.offsetHeight / 2; |
| + |
| + var element = document.elementFromPoint(x, y); |
| + assert_equals(element.nodeName, 'DIV'); |
| + assert_equals(element.id, 'roundedDivChild'); |
| +}, "elementFromPoint should return an element under a point"); |
| +</script> |