Index: third_party/WebKit/LayoutTests/svg/hittest/text-multiple-dx-values.svg |
diff --git a/third_party/WebKit/LayoutTests/svg/hittest/text-multiple-dx-values.svg b/third_party/WebKit/LayoutTests/svg/hittest/text-multiple-dx-values.svg |
new file mode 100644 |
index 0000000000000000000000000000000000000000..dc5d9b87aa47f140b4f2dd73de2eded71e0462cf |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/svg/hittest/text-multiple-dx-values.svg |
@@ -0,0 +1,36 @@ |
+<svg onload="runTest()" width="500" height="150" viewBox="0 0 1000 300" xmlns="http://www.w3.org/2000/svg"> |
+ <rect id="background" width="100%" height="100%" fill="blue" /> |
+ <text id="text" x="10" y="1em" dx="0 50 100">Foo</text> |
+ <defs> |
+ <style type="text/css"> |
+ <![CDATA[ |
+ @font-face { |
+ font-family: Ahem; |
+ src: url(../../resources/Ahem.ttf); |
+ } |
+ text { |
+ font-family: Ahem; |
+ font-size: 40px; |
+ } |
+ ]]> |
+ </style> |
+ <script type="text/javascript"> |
+ <![CDATA[ |
+ function runTest() { |
+ if (window.testRunner) |
+ testRunner.dumpAsText(); |
+ |
+ // The point at 15,15 is contained within the text's bounding box. |
+ // The point at 30,15 is contained in between the text's character cells |
+ // and thus should return the background. |
+ var text = document.getElementById("text"); |
+ var background = document.getElementById("background"); |
+ if (document.elementFromPoint(15, 15) === text && document.elementFromPoint(35, 15) === background) |
+ text.textContent = "PASS"; |
+ else |
+ text.textContent = "FAIL"; |
+ } |
+ ]]> |
+ </script> |
+ </defs> |
+</svg> |