Reviewed by Mitz.
[WebKit-https.git] / LayoutTests / svg / custom / getBBox-js-expected.txt
1
2   
3   
4     function init()
5     {
6         if (window.layoutTestController)
7             layoutTestController.dumpAsText();
8         var g = document.createElementNS("http://www.w3.org/2000/svg", "g");
9         document.rootElement.appendChild(g);
10         var txt = document.createElementNS("http://www.w3.org/2000/svg", "text");
11         txt.setAttribute("x", "50");
12         txt.setAttribute("y", "50");
13         var textNode = document.createTextNode("Failed");
14         txt.appendChild(textNode);
15         g.appendChild(txt);
16         if (g.getBBox().width > 0 && g.getBBox().height > 0) {
17             if (txt.getBBox().width > 0 && txt.getBBox().height > 0) {
18                 var img = document.createElementNS("http://www.w3.org/2000/svg", "image");
19                 img.setAttribute("x", "0");
20                 img.setAttribute("y", "0");
21                 img.setAttribute("width", "100");
22                 img.setAttribute("height", "100");
23                 img.setAttribute("visibility", "hidden");
24                 img.setAttributeNS("http://www.w3.org/1999/xlink", "href", "resources/magnify.png");
25                 g.appendChild(img);
26                 if (img.getBBox().width > 0 && img.getBBox().height > 0) {
27                     var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
28                     rect.setAttribute("x", "0");
29                     rect.setAttribute("y", "0");
30                     rect.setAttribute("width", "100");
31                     rect.setAttribute("height", "100");
32                     rect.setAttribute("visibility", "hidden");
33                     g.appendChild(rect);
34                     if (rect.getBBox().width > 0 && rect.getBBox().height > 0) {
35                     textNode.data = "Passed";
36                     }
37                 }
38             }
39         }
40     }
41   
42   
43 Passed