Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1422)

Unified Diff: third_party/WebKit/LayoutTests/svg/hittest/empty-container.html

Issue 2234173002: Skip hit testing containers with invalid bounding boxes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698