| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 "self", | 208 "self", |
| 209 "statusbar", | 209 "statusbar", |
| 210 "toolbar" | 210 "toolbar" |
| 211 ]; | 211 ]; |
| 212 | 212 |
| 213 var windowReadOnlyProperties = [ | 213 var windowReadOnlyProperties = [ |
| 214 "closed", | 214 "closed", |
| 215 "document", | 215 "document", |
| 216 "pageXOffset", | 216 "pageXOffset", |
| 217 "pageYOffset", | 217 "pageYOffset", |
| 218 "screen", |
| 218 "window", | 219 "window", |
| 219 "top" | 220 "top" |
| 220 ]; | 221 ]; |
| 221 | 222 |
| 222 var windowReadWriteStringProperties = [ | 223 var windowReadWriteStringProperties = [ |
| 223 "defaultStatus", | 224 "defaultStatus", |
| 224 "defaultstatus", | 225 "defaultstatus", |
| 225 "name", | 226 "name", |
| 226 "status" | 227 "status" |
| 227 ]; | 228 ]; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 | 320 |
| 320 log("\n----- tests for getting/setting event handlers -----\n"); | 321 log("\n----- tests for getting/setting event handlers -----\n"); |
| 321 | 322 |
| 322 for (var i = 0; i < windowEventHandlers.length; i++) { | 323 for (var i = 0; i < windowEventHandlers.length; i++) { |
| 323 var property = windowEventHandlers[i]; | 324 var property = windowEventHandlers[i]; |
| 324 shouldBeTrue("canGet('" + property + "')"); | 325 shouldBeTrue("canGet('" + property + "')"); |
| 325 shouldBeTrue("canSetWithCallable('" + property + "')"); | 326 shouldBeTrue("canSetWithCallable('" + property + "')"); |
| 326 } | 327 } |
| 327 } | 328 } |
| 328 </script> | 329 </script> |
| OLD | NEW |