OLD | NEW |
1 <p>This page tests getting and setting window properties and functions.</p> | 1 <p>This page tests getting and setting window properties and functions.</p> |
2 <pre id="console"></pre> | 2 <pre id="console"></pre> |
3 | 3 |
4 <script> | 4 <script> |
5 function log(s) | 5 function log(s) |
6 { | 6 { |
7 document.getElementById("console").appendChild(document.createTextNode(s + "
\n")); | 7 document.getElementById("console").appendChild(document.createTextNode(s + "
\n")); |
8 } | 8 } |
9 | 9 |
10 function shouldBe(a, b) | 10 function shouldBe(a, b) |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 "console", | 184 "console", |
185 "devicePixelRatio", | 185 "devicePixelRatio", |
186 "event", | 186 "event", |
187 "frames", | 187 "frames", |
188 "history", | 188 "history", |
189 "innerHeight", | 189 "innerHeight", |
190 "innerWidth", | 190 "innerWidth", |
191 "length", | 191 "length", |
192 "locationbar", | 192 "locationbar", |
193 "menubar", | 193 "menubar", |
194 "navigator", | |
195 "offscreenBuffering", | 194 "offscreenBuffering", |
196 "opener", | 195 "opener", |
197 "outerHeight", | 196 "outerHeight", |
198 "outerWidth", | 197 "outerWidth", |
199 "parent", | 198 "parent", |
200 "personalbar", | 199 "personalbar", |
201 "screenLeft", | 200 "screenLeft", |
202 "screenTop", | 201 "screenTop", |
203 "screenX", | 202 "screenX", |
204 "screenY", | 203 "screenY", |
205 "scrollX", | 204 "scrollX", |
206 "scrollY", | 205 "scrollY", |
207 "scrollbars", | 206 "scrollbars", |
208 "self", | 207 "self", |
209 "statusbar", | 208 "statusbar", |
210 "toolbar" | 209 "toolbar" |
211 ]; | 210 ]; |
212 | 211 |
213 var windowReadOnlyProperties = [ | 212 var windowReadOnlyProperties = [ |
214 "closed", | 213 "closed", |
215 "document", | 214 "document", |
| 215 "navigator", |
216 "pageXOffset", | 216 "pageXOffset", |
217 "pageYOffset", | 217 "pageYOffset", |
218 "window", | 218 "window", |
219 "top" | 219 "top" |
220 ]; | 220 ]; |
221 | 221 |
222 var windowReadWriteStringProperties = [ | 222 var windowReadWriteStringProperties = [ |
223 "defaultStatus", | 223 "defaultStatus", |
224 "defaultstatus", | 224 "defaultstatus", |
225 "name", | 225 "name", |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 | 319 |
320 log("\n----- tests for getting/setting event handlers -----\n"); | 320 log("\n----- tests for getting/setting event handlers -----\n"); |
321 | 321 |
322 for (var i = 0; i < windowEventHandlers.length; i++) { | 322 for (var i = 0; i < windowEventHandlers.length; i++) { |
323 var property = windowEventHandlers[i]; | 323 var property = windowEventHandlers[i]; |
324 shouldBeTrue("canGet('" + property + "')"); | 324 shouldBeTrue("canGet('" + property + "')"); |
325 shouldBeTrue("canSetWithCallable('" + property + "')"); | 325 shouldBeTrue("canSetWithCallable('" + property + "')"); |
326 } | 326 } |
327 } | 327 } |
328 </script> | 328 </script> |
OLD | NEW |