OLD | NEW |
1 <html xmlns="http://www.w3.org/1999/xhtml"> | 1 <html xmlns="http://www.w3.org/1999/xhtml"> |
2 <head> | 2 <head> |
3 <style type="text/css"> | 3 <style type="text/css"> |
4 .pass { color: green; } | 4 .pass { color: green; } |
5 .fail { color: red; } | 5 .fail { color: red; } |
6 </style> | 6 </style> |
7 <script type="text/javascript" charset="utf-8"> | 7 <script type="text/javascript" charset="utf-8"> |
8 function printOut(msg) | 8 function printOut(msg) |
9 { | 9 { |
10 var console = document.getElementById("console"); | 10 var console = document.getElementById("console"); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 type: 'SVGLength', | 67 type: 'SVGLength', |
68 elementToUse: svg.createSVGLength(), | 68 elementToUse: svg.createSVGLength(), |
69 attributes: [ | 69 attributes: [ |
70 {name: 'valueAsString', expectedNull: '0'} | 70 {name: 'valueAsString', expectedNull: '0'} |
71 ] | 71 ] |
72 }, | 72 }, |
73 { | 73 { |
74 type: 'SVGScriptElement', | 74 type: 'SVGScriptElement', |
75 elementToUse: document.createElementNS(svgNS, 'script'), | 75 elementToUse: document.createElementNS(svgNS, 'script'), |
76 attributes: [ | 76 attributes: [ |
77 {name: 'type', expectedNull: ''} | 77 {name: 'type', expectedNull: 'null'} |
78 ] | 78 ] |
79 } | 79 } |
80 ]; | 80 ]; |
81 | 81 |
82 for (element in listing) { | 82 for (element in listing) { |
83 var type = listing[element].type; | 83 var type = listing[element].type; |
84 var elementToUse = listing[element].elementToUse; | 84 var elementToUse = listing[element].elementToUse; |
85 var attrs = listing[element].attributes; | 85 var attrs = listing[element].attributes; |
86 for (attr in attrs) { | 86 for (attr in attrs) { |
87 nullTestElementAttribute(type, elementToUse, attrs[attr].nam
e, attrs[attr].expectedNull); | 87 nullTestElementAttribute(type, elementToUse, attrs[attr].nam
e, attrs[attr].expectedNull); |
88 } | 88 } |
89 printOut(''); | 89 printOut(''); |
90 } | 90 } |
91 } | 91 } |
92 | 92 |
93 </script> | 93 </script> |
94 </head> | 94 </head> |
95 | 95 |
96 <body onload="runTests();"> | 96 <body onload="runTests();"> |
97 <p>This test setting various attributes of a SVG elements to JavaScript null
.</p> | 97 <p>This test setting various attributes of a SVG elements to JavaScript null
.</p> |
98 <div id="console"></div> | 98 <div id="console"></div> |
99 </body> | 99 </body> |
100 </html> | 100 </html> |
OLD | NEW |