OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <title>Interfaces</title> |
| 3 <script src="../../../resources/testharness.js"></script> |
| 4 <script src="../../../resources/testharnessreport.js"></script> |
| 5 <div id="log"></div> |
| 6 <script> |
| 7 function testInterfaceDeletable(iface) { |
| 8 test(function() { |
| 9 assert_true(!!window[iface], "Interface should exist.") |
| 10 assert_true(delete window[iface], "The delete operator should return true.") |
| 11 assert_equals(window[iface], undefined, "Interface should be gone.") |
| 12 }, "Should be able to delete " + iface + ".") |
| 13 } |
| 14 var interfaces = [ |
| 15 "Event", |
| 16 "CustomEvent", |
| 17 "EventTarget", |
| 18 "Node", |
| 19 "Document", |
| 20 "DOMImplementation", |
| 21 "DocumentFragment", |
| 22 "ProcessingInstruction", |
| 23 "DocumentType", |
| 24 "Element", |
| 25 "Attr", |
| 26 "CharacterData", |
| 27 "Text", |
| 28 "Comment", |
| 29 "NodeIterator", |
| 30 "TreeWalker", |
| 31 "NodeFilter", |
| 32 "NodeList", |
| 33 "HTMLCollection", |
| 34 "DOMStringList", |
| 35 "DOMTokenList", |
| 36 "DOMSettableTokenList" |
| 37 ]; |
| 38 test(function() { |
| 39 for (var p in window) { |
| 40 interfaces.forEach(function(i) { |
| 41 assert_not_equals(p, i) |
| 42 }) |
| 43 } |
| 44 }, "Interface objects properties should not be Enumerable") |
| 45 interfaces.forEach(testInterfaceDeletable); |
| 46 </script> |
OLD | NEW |