Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/svg/hittest/text-with-text-node-and-content-elements.svg |
| diff --git a/third_party/WebKit/LayoutTests/svg/hittest/text-with-text-node-and-content-elements.svg b/third_party/WebKit/LayoutTests/svg/hittest/text-with-text-node-and-content-elements.svg |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ac1447e7c956e2d64264ea976196546340067f79 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/svg/hittest/text-with-text-node-and-content-elements.svg |
| @@ -0,0 +1,32 @@ |
| +<svg onload="runTest()" width="500" height="150" viewBox="0 0 1000 300" xmlns="http://www.w3.org/2000/svg" onclick="click(evt)"> |
|
fs
2015/11/17 09:47:49
Drop onclick.
pdr.
2015/11/17 21:51:23
Done
|
| + <text id="text" x="10" y="1em">Foo <tspan id="tspan">Bar</tspan> Baz</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 word "Foo", a text node. |
| + // The point at 120,15 is contained within the word "Bar", a <tspan>. |
| + var text = document.getElementById("text"); |
| + if (document.elementFromPoint(15, 15) === text && document.elementFromPoint(110, 15) === document.getElementById("tspan")) |
| + text.textContent = "PASS"; |
| + else |
| + text.textContent = "FAIL"; |
| + } |
| + ]]> |
| + </script> |
| + </defs> |
| +</svg> |