| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 eval("window." + keyPath + " = " + valuePath); | 77 eval("window." + keyPath + " = " + valuePath); |
| 78 return eval("window." + keyPath) === eval("window." + valuePath); | 78 return eval("window." + keyPath) === eval("window." + valuePath); |
| 79 } catch(e) { | 79 } catch(e) { |
| 80 return false; | 80 return false; |
| 81 } | 81 } |
| 82 } | 82 } |
| 83 | 83 |
| 84 var windowReadWriteProperties = [ | 84 var windowReadWriteProperties = [ |
| 85 "Attr", | 85 "Attr", |
| 86 "CDATASection", | 86 "CDATASection", |
| 87 "CSSPrimitiveValue", | |
| 88 "CSSRule", | 87 "CSSRule", |
| 89 "CSSStyleDeclaration", | 88 "CSSStyleDeclaration", |
| 90 "CharacterData", | 89 "CharacterData", |
| 91 "Comment", | 90 "Comment", |
| 92 "DOMException", | 91 "DOMException", |
| 93 "DOMImplementation", | 92 "DOMImplementation", |
| 94 "DOMParser", | 93 "DOMParser", |
| 95 "Document", | 94 "Document", |
| 96 "DocumentFragment", | 95 "DocumentFragment", |
| 97 "DocumentType", | 96 "DocumentType", |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 | 317 |
| 319 log("\n----- tests for getting/setting event handlers -----\n"); | 318 log("\n----- tests for getting/setting event handlers -----\n"); |
| 320 | 319 |
| 321 for (var i = 0; i < windowEventHandlers.length; i++) { | 320 for (var i = 0; i < windowEventHandlers.length; i++) { |
| 322 var property = windowEventHandlers[i]; | 321 var property = windowEventHandlers[i]; |
| 323 shouldBeTrue("canGet('" + property + "')"); | 322 shouldBeTrue("canGet('" + property + "')"); |
| 324 shouldBeTrue("canSetWithCallable('" + property + "')"); | 323 shouldBeTrue("canSetWithCallable('" + property + "')"); |
| 325 } | 324 } |
| 326 } | 325 } |
| 327 </script> | 326 </script> |
| OLD | NEW |