Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / text / degenerate-text-path.html
blobcb5076b6a146aa928d2cf8d9d082791bad1602a6
1 <!DOCTYPE html>
2 <html>
3 <body>
4 Test for crbug.com/227397: This test passes if there is a green box with just the word "PASS".<br/>
5 <svg xmlns="http://www.w3.org/2000/svg" width="350" height="350">
6 <rect width="100" height="100" fill="green" />
7 <defs>
8 <path id="passpath" d="M 0 0 M 300 300 M 110 100 L 200 100Z" />
9 <path id="failpath1" d="M 20 20Z" />
10 <path id="failpath2" d="M 20 20 M 25 25Z" />
11 <path id="failpath3" d="M 20 20 L 20.5 20.5Z" />
12 <path id="failpath4" d="M 0 0 M 10 10 M 20 20 L 20.5 20.5Z" />
13 </defs>
15 <!-- The following text should render next to the green box. -->
16 <text fill="green">
17 <textPath xlink:href="#passpath">PASS</textPath>
18 </text>
20 <!-- SVG 2.0 spec: "Glyphs whose midpoint-on-the-path are off either end of the path
21 are not rendered." The following text paths should not render: -->
22 <text transform="translate(200 200)" fill="red">
23 <textPath xlink:href="#failpath1">FAIL</textPath>
24 </text>
25 <text transform="translate(200 225)" fill="red">
26 <textPath xlink:href="#failpath2">FAIL</textPath>
27 </text>
28 <text transform="translate(200 250)" fill="red">
29 <textPath xlink:href="#failpath3">FAIL</textPath>
30 </text>
31 <text transform="translate(200 275)" fill="red">
32 <textPath xlink:href="#failpath4">FAIL</textPath>
33 </text>
34 </svg>
35 </body>
36 </html>