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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/collections/namednodemap-supported-property-names.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 <meta charset=utf-8>
3 <title>NamedNodeMap Test: Supported property names</title>
4 <script src="../../../../resources/testharness.js"></script>
5 <script src="../../../../resources/testharnessreport.js"></script>
6 <div id="log"></div>
7 <div id="simple" class="fancy">Simple</div>
8 <input id="result" type="text" value="" width="200px">
9 <script>
10
11 test(function() {
12 var elt = document.querySelector('#simple');
13 assert_array_equals(Object.getOwnPropertyNames(elt.attributes),
14 ['0','1','id','class']);
15 }, "Object.getOwnPropertyNames on NamedNodeMap");
16
17 test(function() {
18 var result = document.getElementById("result");
19 assert_array_equals(Object.getOwnPropertyNames(result.attributes),
20 ['0','1','2','3','id','type','value','width']);
21 }, "Object.getOwnPropertyNames on NamedNodeMap of input");
22
23 test(function() {
24 var result = document.getElementById("result");
25 result.removeAttribute("width");
26 assert_array_equals(Object.getOwnPropertyNames(result.attributes),
27 ['0','1','2','id','type','value']);
28 }, "Object.getOwnPropertyNames on NamedNodeMap after attribute removal");
29
30 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698