diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /testing/web-platform/tests/dom/collections/namednodemap-supported-property-names.html | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/tests/dom/collections/namednodemap-supported-property-names.html')
-rw-r--r-- | testing/web-platform/tests/dom/collections/namednodemap-supported-property-names.html | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/testing/web-platform/tests/dom/collections/namednodemap-supported-property-names.html b/testing/web-platform/tests/dom/collections/namednodemap-supported-property-names.html new file mode 100644 index 000000000..2c5dee4ef --- /dev/null +++ b/testing/web-platform/tests/dom/collections/namednodemap-supported-property-names.html @@ -0,0 +1,30 @@ +<!DOCTYPE HTML> +<meta charset=utf-8> +<title>NamedNodeMap Test: Supported property names</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div id="log"></div> +<div id="simple" class="fancy">Simple</div> +<input id="result" type="text" value="" width="200px"> +<script> + +test(function() { + var elt = document.querySelector('#simple'); + assert_array_equals(Object.getOwnPropertyNames(elt.attributes), + ['0','1','id','class']); +}, "Object.getOwnPropertyNames on NamedNodeMap"); + +test(function() { + var result = document.getElementById("result"); + assert_array_equals(Object.getOwnPropertyNames(result.attributes), + ['0','1','2','3','id','type','value','width']); +}, "Object.getOwnPropertyNames on NamedNodeMap of input"); + +test(function() { + var result = document.getElementById("result"); + result.removeAttribute("width"); + assert_array_equals(Object.getOwnPropertyNames(result.attributes), + ['0','1','2','id','type','value']); +}, "Object.getOwnPropertyNames on NamedNodeMap after attribute removal"); + +</script>
\ No newline at end of file |