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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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", | 87 "CSSPrimitiveValue", |
88 "CSSRule", | 88 "CSSRule", |
89 "CSSStyleDeclaration", | 89 "CSSStyleDeclaration", |
90 "CSSValue", | |
91 "CharacterData", | 90 "CharacterData", |
92 "Comment", | 91 "Comment", |
93 "DOMException", | 92 "DOMException", |
94 "DOMImplementation", | 93 "DOMImplementation", |
95 "DOMParser", | 94 "DOMParser", |
96 "Document", | 95 "Document", |
97 "DocumentFragment", | 96 "DocumentFragment", |
98 "DocumentType", | 97 "DocumentType", |
99 "Element", | 98 "Element", |
100 "EvalError", | 99 "EvalError", |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 | 318 |
320 log("\n----- tests for getting/setting event handlers -----\n"); | 319 log("\n----- tests for getting/setting event handlers -----\n"); |
321 | 320 |
322 for (var i = 0; i < windowEventHandlers.length; i++) { | 321 for (var i = 0; i < windowEventHandlers.length; i++) { |
323 var property = windowEventHandlers[i]; | 322 var property = windowEventHandlers[i]; |
324 shouldBeTrue("canGet('" + property + "')"); | 323 shouldBeTrue("canGet('" + property + "')"); |
325 shouldBeTrue("canSetWithCallable('" + property + "')"); | 324 shouldBeTrue("canSetWithCallable('" + property + "')"); |
326 } | 325 } |
327 } | 326 } |
328 </script> | 327 </script> |
OLD | NEW |