| <!DOCTYPE html> |
| <html> |
| <body> |
| Test for crbug.com/227397: This test passes if there is a green box with just the word "PASS".<br/> |
| <svg xmlns="http://www.w3.org/2000/svg" width="350" height="350"> |
| <rect width="100" height="100" fill="green" /> |
| <defs> |
| <path id="passpath" d="M 0 0 M 300 300 M 110 100 L 200 100Z" /> |
| <path id="failpath1" d="M 20 20Z" /> |
| <path id="failpath2" d="M 20 20 M 25 25Z" /> |
| <path id="failpath3" d="M 20 20 L 20.5 20.5Z" /> |
| <path id="failpath4" d="M 0 0 M 10 10 M 20 20 L 20.5 20.5Z" /> |
| </defs> |
| |
| <!-- The following text should render next to the green box. --> |
| <text fill="green"> |
| <textPath xlink:href="#passpath">PASS</textPath> |
| </text> |
| |
| <!-- SVG 2.0 spec: "Glyphs whose midpoint-on-the-path are off either end of the path |
| are not rendered." The following text paths should not render: --> |
| <text transform="translate(200 200)" fill="red"> |
| <textPath xlink:href="#failpath1">FAIL</textPath> |
| </text> |
| <text transform="translate(200 225)" fill="red"> |
| <textPath xlink:href="#failpath2">FAIL</textPath> |
| </text> |
| <text transform="translate(200 250)" fill="red"> |
| <textPath xlink:href="#failpath3">FAIL</textPath> |
| </text> |
| <text transform="translate(200 275)" fill="red"> |
| <textPath xlink:href="#failpath4">FAIL</textPath> |
| </text> |
| </svg> |
| </body> |
| </html> |