Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1115)

Side by Side Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/interface-objects.html

Issue 1529523002: Import dom/ from web-platform-tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweak W3CImportExpectations Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698