1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <svg xmlns=
"http://www.w3.org/2000/svg" onload=
"init()">
3 <script type=
"text/javascript">
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);
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");
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");
35 if (rect.getBBox().width
> 0 && rect.getBBox().height
> 0) {
36 textNode.data =
"Passed";