OLD | NEW |
1 <script> | 1 <script> |
2 | 2 |
3 function test() { | 3 function test() { |
4 if (window.testRunner) | 4 if (window.testRunner) |
5 testRunner.dumpAsText(); | 5 testRunner.dumpAsText(); |
6 | 6 |
7 var undefined; | 7 var undefined; |
8 | 8 |
9 var features = [ | 9 var features = [ |
10 ["Core", undefined], | 10 ["Core", undefined], |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 ["nonsense", "2.0"], | 140 ["nonsense", "2.0"], |
141 ["nonsense", "3.0"], | 141 ["nonsense", "3.0"], |
142 ["nonsense", "nonsense"], | 142 ["nonsense", "nonsense"], |
143 ["nonsense", undefined], | 143 ["nonsense", undefined], |
144 ["nonsense", null], | 144 ["nonsense", null], |
145 ]; | 145 ]; |
146 | 146 |
147 for (var i = 0; i < features.length; ++i) | 147 for (var i = 0; i < features.length; ++i) |
148 { | 148 { |
149 var item = features[i]; | 149 var item = features[i]; |
150 if (item[1] == "omitted") { | 150 if (item[1] == "omitted") |
151 var hasFeature = document.implementation.hasFeature(item[0]); | 151 var hasFeature = document.implementation.hasFeature(item[0]); |
152 var isSupported = document.body.isSupported(item[0]); | 152 else |
153 } else { | |
154 var hasFeature = document.implementation.hasFeature(item[0], item[1]
); | 153 var hasFeature = document.implementation.hasFeature(item[0], item[1]
); |
155 var isSupported = document.body.isSupported(item[0], item[1]); | |
156 } | |
157 | 154 |
158 var item0String = item[0]; | 155 var item0String = item[0]; |
159 if (typeof item0String == "string") | 156 if (typeof item0String == "string") |
160 item0String = '"' + item0String + '"'; | 157 item0String = '"' + item0String + '"'; |
161 var item1String = item[1]; | 158 var item1String = item[1]; |
162 if (typeof item1String == "string" && item[1] != "omitted") | 159 if (typeof item1String == "string" && item[1] != "omitted") |
163 item1String = '"' + item1String + '"'; | 160 item1String = '"' + item1String + '"'; |
164 var message = item0String + ', ' + item1String + ': ' + hasFeature + ',
' + isSupported; | 161 var message = item0String + ', ' + item1String + ': ' + hasFeature; |
165 | 162 |
166 var div = document.createElement('div'); | 163 var div = document.createElement('div'); |
167 div.innerHTML = message; | 164 div.innerHTML = message; |
168 document.body.appendChild(div); | 165 document.body.appendChild(div); |
169 } | 166 } |
170 } | 167 } |
171 | 168 |
172 </script> | 169 </script> |
173 | 170 |
174 <body onload="test()"> | 171 <body onload="test()"> |
175 </body> | 172 </body> |
OLD | NEW |