Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / custom / getBBox-js.svg
bloba977ae30dd8c2ec8389b0bdefca989d271567a8c
1 <?xml version="1.0" encoding="UTF-8"?>
2 <svg xmlns="http://www.w3.org/2000/svg" onload="init()">
3 <script type="text/javascript">
4 <![CDATA[
5 function init()
7 if (window.testRunner)
8 testRunner.dumpAsText();
9 var g = document.createElementNS("http://www.w3.org/2000/svg", "g");
10 document.rootElement.appendChild(g);
11 var txt = document.createElementNS("http://www.w3.org/2000/svg", "text");
12 txt.setAttribute("x", "50");
13 txt.setAttribute("y", "50");
14 var textNode = document.createTextNode("Failed");
15 txt.appendChild(textNode);
16 g.appendChild(txt);
17 if (g.getBBox().width > 0 && g.getBBox().height > 0) {
18 if (txt.getBBox().width > 0 && txt.getBBox().height > 0) {
19 var img = document.createElementNS("http://www.w3.org/2000/svg", "image");
20 img.setAttribute("x", "0");
21 img.setAttribute("y", "0");
22 img.setAttribute("width", "100");
23 img.setAttribute("height", "100");
24 img.setAttribute("visibility", "hidden");
25 img.setAttributeNS("http://www.w3.org/1999/xlink", "href", "resources/magnify.png");
26 g.appendChild(img);
27 if (img.getBBox().width > 0 && img.getBBox().height > 0) {
28 var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
29 rect.setAttribute("x", "0");
30 rect.setAttribute("y", "0");
31 rect.setAttribute("width", "100");
32 rect.setAttribute("height", "100");
33 rect.setAttribute("visibility", "hidden");
34 g.appendChild(rect);
35 if (rect.getBBox().width > 0 && rect.getBBox().height > 0) {
36 textNode.data = "Passed";
42 ]]>
43 </script>
44 </svg>