Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / custom / multiple-title-elements.svg
blob6212623e9fbba5b80a50dc6274c5d0af95e35446
1 <?xml version="1.0" standalone="no"?>
2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
3 "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4 <svg width="400" height="300" viewBox="0 0 600 500"
5 xmlns="http://www.w3.org/2000/svg" version="1.1" onload="test()">
6 <script>
8 var logOffset = 40;
9 var logOffsetIncrement = 40
10 function log(message)
12 var t = document.createElementNS("http://www.w3.org/2000/svg", "text");
13 t.appendChild(document.createTextNode(message));
14 t.setAttribute('y', logOffset);
15 t.setAttribute('x', 0);
16 logOffset += logOffsetIncrement;
17 document.getElementById("console").appendChild(t);
20 function expect(expected, actual)
22 var msg = "Expected " + expected + ", got " + actual + ": ";
23 if (expected == actual)
24 log(msg + "PASS");
25 else
26 log(msg + "FAIL");
29 function createTitleElement(title)
31 var t = document.createElementNS("http://www.w3.org/2000/svg", 'title');
32 t.appendChild(document.createTextNode(title));
33 return t;
36 function test()
38 if (window.testRunner)
39 testRunner.dumpAsText();
41 expect('', document.title);
42 document.documentElement.appendChild(createTitleElement('First title'));
43 expect('First title', document.title);
44 document.documentElement.appendChild(createTitleElement('Second title'));
45 expect('First title', document.title);
46 document.documentElement.removeChild(document.getElementsByTagName('title')[0]);
47 expect('Second title', document.title);
49 </script>
50 <g id="console">
51 </g>
52 </svg>