Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / text / add-tspan-position-bug.html
blob5e02329c71583efcc97c1ce217fd19acd65354c5
1 <!DOCTYPE html>
2 <html>
3 <body onload="loaded()">
4 <svg>
5 <title>This test used to be laid out on a single line, instead of multiple ones</title>
6 <text id="text" y="50"></text>
8 <script>
9 var text = document.getElementsByTagName("text")[0];
11 function addSpans() {
12 var tspan1 = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
13 tspan1.appendChild(document.createTextNode("Should be on"));
15 var tspan2 = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
16 tspan2.setAttribute("dy", "30");
17 tspan2.appendChild(document.createTextNode("different lines"));
19 text.appendChild(tspan1);
20 text.appendChild(tspan2);
22 if (window.testRunner)
23 testRunner.notifyDone();
26 if (window.testRunner)
27 testRunner.waitUntilDone();
29 function loaded() {
30 // Bug is only trigger from another loop.
31 setTimeout(addSpans, 0);
33 </script>
34 </svg>
35 </body>
36 </html>