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 "DOMTokenList" | |
35 ]; | |
36 test(function() { | |
37 for (var p in window) { | |
38 interfaces.forEach(function(i) { | |
39 assert_not_equals(p, i) | |
40 }) | |
41 } | |
42 }, "Interface objects properties should not be Enumerable") | |
43 interfaces.forEach(testInterfaceDeletable); | |
44 </script> | |
OLD | NEW |