Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/svg/hittest/empty-container.html |
| diff --git a/third_party/WebKit/LayoutTests/svg/hittest/empty-container.html b/third_party/WebKit/LayoutTests/svg/hittest/empty-container.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5afff6e310f527811b07816a17aeb10728db4538 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/svg/hittest/empty-container.html |
| @@ -0,0 +1,24 @@ |
| +<!DOCTYPE html> |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<style> |
| + * { |
| + margin: 0; |
| + } |
| + svg { |
| + pointer-events: bounding-box; |
| + } |
| +</style> |
| +<svg id="svg" width="200" height="200"> |
| + <g></g> |
| +</svg> |
| +Hit testing an empty container should not crash. |
|
fs
2016/08/11 15:22:04
To mesh better with testharness, this should proba
pdr.
2016/08/11 22:51:24
Done and confirmed the failure text looks nicer no
|
| +<script> |
| + test(function() { |
| + var checkOrigin = document.elementFromPoint(0, 0); |
| + assert_equals(checkOrigin, svg, "element @ 0, 0"); |
| + |
| + var checkPoint = document.elementFromPoint(50, 50); |
| + assert_equals(checkPoint, svg, "element @ 50, 50"); |
| + }); |
| +</script> |