Index: third_party/WebKit/LayoutTests/svg/hittest/text-dominant-baseline-hanging.svg |
diff --git a/third_party/WebKit/LayoutTests/svg/hittest/text-dominant-baseline-hanging.svg b/third_party/WebKit/LayoutTests/svg/hittest/text-dominant-baseline-hanging.svg |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a5acc11a9ba9316594d8fbc13d6719026fd02ba2 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/svg/hittest/text-dominant-baseline-hanging.svg |
@@ -0,0 +1,29 @@ |
+<svg onload="runTest()" width="500" height="150" viewBox="0 0 1000 300" xmlns="http://www.w3.org/2000/svg"> |
+ <script src="../../resources/ahem.js"></script> |
+ <text id="text" dominant-baseline="hanging" x="10" y="10">Foo</text> |
+ <defs> |
+ <style type="text/css"> |
+ <![CDATA[ |
+ text { |
+ font-family: Ahem; |
+ font-size: 40px; |
+ } |
+ ]]> |
+ </style> |
+ <script type="text/javascript"> |
+ <![CDATA[ |
+ function runTest() { |
+ if (window.testRunner) |
+ testRunner.dumpAsText(); |
+ |
+ // (15,15) is contained within a glyph cell of #text. |
+ var text = document.getElementById("text"); |
+ if (document.elementFromPoint(15, 15) === text) |
+ text.textContent = "PASS"; |
+ else |
+ text.textContent = "FAIL"; |
+ } |
+ ]]> |
+ </script> |
+ </defs> |
+</svg> |