OLD | NEW |
(Empty) | |
| 1 <svg onload="runTest()" width="500" height="150" viewBox="0 0 1000 300" xmlns="h
ttp://www.w3.org/2000/svg"> |
| 2 <text id="text" x="10" y="1em">Foo</text> |
| 3 <defs> |
| 4 <style type="text/css"> |
| 5 <![CDATA[ |
| 6 @font-face { |
| 7 font-family: Ahem; |
| 8 src: url(../../resources/Ahem.ttf); |
| 9 } |
| 10 text { |
| 11 font-family: Ahem; |
| 12 font-size: 40px; |
| 13 } |
| 14 ]]> |
| 15 </style> |
| 16 <script type="text/javascript"> |
| 17 <![CDATA[ |
| 18 function runTest() { |
| 19 if (window.testRunner) |
| 20 testRunner.dumpAsText(); |
| 21 |
| 22 // The point at 15,15 is contained within the text's bounding bo
x. |
| 23 var text = document.getElementById("text"); |
| 24 if (document.elementFromPoint(15, 15) === text) |
| 25 text.textContent = "PASS"; |
| 26 else |
| 27 text.textContent = "FAIL"; |
| 28 } |
| 29 ]]> |
| 30 </script> |
| 31 </defs> |
| 32 </svg> |
OLD | NEW |