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 "frames", | 184 "frames", |
185 "innerHeight", | 185 "innerHeight", |
186 "innerWidth", | 186 "innerWidth", |
187 "length", | 187 "length", |
188 "locationbar", | 188 "locationbar", |
189 "menubar", | 189 "menubar", |
190 "offscreenBuffering", | 190 "offscreenBuffering", |
191 "opener", | 191 "opener", |
192 "outerHeight", | 192 "outerHeight", |
193 "outerWidth", | 193 "outerWidth", |
| 194 "pageXOffset", |
| 195 "pageYOffset", |
194 "parent", | 196 "parent", |
195 "personalbar", | 197 "personalbar", |
| 198 "screen", |
196 "screenLeft", | 199 "screenLeft", |
197 "screenTop", | 200 "screenTop", |
198 "screenX", | 201 "screenX", |
199 "screenY", | 202 "screenY", |
200 "scrollX", | 203 "scrollX", |
201 "scrollY", | 204 "scrollY", |
202 "scrollbars", | 205 "scrollbars", |
203 "self", | 206 "self", |
204 "statusbar", | 207 "statusbar", |
205 "toolbar" | 208 "toolbar" |
206 ]; | 209 ]; |
207 | 210 |
208 var windowReadOnlyProperties = [ | 211 var windowReadOnlyProperties = [ |
209 "closed", | 212 "closed", |
210 "document", | 213 "document", |
211 "history", | 214 "history", |
212 "navigator", | 215 "navigator", |
213 "pageXOffset", | |
214 "pageYOffset", | |
215 "screen", | |
216 "window", | 216 "window", |
217 "top" | 217 "top" |
218 ]; | 218 ]; |
219 | 219 |
220 var windowReadWriteStringProperties = [ | 220 var windowReadWriteStringProperties = [ |
221 "defaultStatus", | 221 "defaultStatus", |
222 "defaultstatus", | 222 "defaultstatus", |
223 "name", | 223 "name", |
224 "status" | 224 "status" |
225 ]; | 225 ]; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 | 317 |
318 log("\n----- tests for getting/setting event handlers -----\n"); | 318 log("\n----- tests for getting/setting event handlers -----\n"); |
319 | 319 |
320 for (var i = 0; i < windowEventHandlers.length; i++) { | 320 for (var i = 0; i < windowEventHandlers.length; i++) { |
321 var property = windowEventHandlers[i]; | 321 var property = windowEventHandlers[i]; |
322 shouldBeTrue("canGet('" + property + "')"); | 322 shouldBeTrue("canGet('" + property + "')"); |
323 shouldBeTrue("canSetWithCallable('" + property + "')"); | 323 shouldBeTrue("canSetWithCallable('" + property + "')"); |
324 } | 324 } |
325 } | 325 } |
326 </script> | 326 </script> |
OLD | NEW |