OLD | NEW |
1 <?xml version="1.0" encoding="UTF-8"?> | 1 <!-- Test the bounding box calculated for two perpendicular lines of length 100p
x created with the polyline element --> |
2 <!-- Test the bounding box calculated for two perpendicular lines of length 100p
x --> | |
3 <!-- If the bounding box is 100x100, we consider this test passing. --> | 2 <!-- If the bounding box is 100x100, we consider this test passing. --> |
4 <svg xmlns="http://www.w3.org/2000/svg" onload="init()"> | 3 <svg xmlns="http://www.w3.org/2000/svg" onload="init()"> |
5 <script type="text/javascript"> | 4 <script type="text/javascript"> |
6 <![CDATA[ | 5 <![CDATA[ |
7 function init() | 6 function init() |
8 { | 7 { |
9 if (window.testRunner) | 8 if (window.testRunner) |
10 testRunner.dumpAsText(); | 9 testRunner.dumpAsText(); |
11 var txt = document.getElementById("text"); | 10 var txt = document.getElementById("text"); |
12 size = document.getElementById("shape").getBBox(); | 11 size = document.getElementById("shape").getBBox(); |
13 var passState = "FAIL"; | 12 var passState = "FAIL"; |
14 if(size.width == 100 && size.height == 100) | 13 if(size.width == 100 && size.height == 100) |
15 passState = "PASS"; | 14 passState = "PASS"; |
16 var textNode = document.createTextNode(size.width + " " + size.height +
" " + passState); | 15 var textNode = document.createTextNode(size.width + " " + size.height +
" " + passState); |
17 txt.appendChild(textNode); | 16 txt.appendChild(textNode); |
18 } | 17 } |
19 ]]> | 18 ]]> |
20 </script> | 19 </script> |
21 <g id="shape"> | 20 <g id="shape"> |
22 <path stroke="#666666" stroke-width="2.0" stroke-linejoin="round" stroke-lin
ecap="butt" d="M5 5L5 105" fill-rule="nonzero"></path> | 21 <polyline stroke="#666666" stroke-width="2.0" stroke-linejoin="round" stroke
-linecap="butt" points="5,5 5,105" fill-rule="nonzero" /> |
23 <path stroke="#666666" stroke-width="2.0" stroke-linejoin="round" stroke-lin
ecap="butt" d="M5 5L105 5" fill-rule="nonzero"></path> | 22 <polyline stroke="#666666" stroke-width="2.0" stroke-linejoin="round" stroke
-linecap="butt" points="5,5 105,5" fill-rule="nonzero" /> |
24 </g> | 23 </g> |
25 <text id="text" x="50" y="50" /> | 24 <text id="text" x="50" y="50" /> |
26 </svg> | 25 </svg> |
OLD | NEW |