diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/webidl/ecmascript-binding/es-exceptions/DOMException-constants.any.js | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/webidl/ecmascript-binding/es-exceptions/DOMException-constants.any.js')
-rw-r--r-- | testing/web-platform/tests/webidl/ecmascript-binding/es-exceptions/DOMException-constants.any.js | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/testing/web-platform/tests/webidl/ecmascript-binding/es-exceptions/DOMException-constants.any.js b/testing/web-platform/tests/webidl/ecmascript-binding/es-exceptions/DOMException-constants.any.js new file mode 100644 index 0000000000..bb846a494e --- /dev/null +++ b/testing/web-platform/tests/webidl/ecmascript-binding/es-exceptions/DOMException-constants.any.js @@ -0,0 +1,51 @@ +'use strict'; + +test(function() { + // https://www.w3.org/Bugs/Public/show_bug.cgi?id=27732 + var constants = [ + "INDEX_SIZE_ERR", + "DOMSTRING_SIZE_ERR", + "HIERARCHY_REQUEST_ERR", + "WRONG_DOCUMENT_ERR", + "INVALID_CHARACTER_ERR", + "NO_DATA_ALLOWED_ERR", + "NO_MODIFICATION_ALLOWED_ERR", + "NOT_FOUND_ERR", + "NOT_SUPPORTED_ERR", + "INUSE_ATTRIBUTE_ERR", + "INVALID_STATE_ERR", + "SYNTAX_ERR", + "INVALID_MODIFICATION_ERR", + "NAMESPACE_ERR", + "INVALID_ACCESS_ERR", + "VALIDATION_ERR", + "TYPE_MISMATCH_ERR", + "SECURITY_ERR", + "NETWORK_ERR", + "ABORT_ERR", + "URL_MISMATCH_ERR", + "QUOTA_EXCEEDED_ERR", + "TIMEOUT_ERR", + "INVALID_NODE_TYPE_ERR", + "DATA_CLONE_ERR" + ] + var objects = [ + [DOMException, "DOMException constructor object"], + [DOMException.prototype, "DOMException prototype object"] + ] + constants.forEach(function(name, i) { + objects.forEach(function(o) { + var object = o[0], description = o[1]; + test(function() { + assert_equals(object[name], i + 1, name) + assert_own_property(object, name) + var pd = Object.getOwnPropertyDescriptor(object, name) + assert_false("get" in pd, "get") + assert_false("set" in pd, "set") + assert_false(pd.writable, "writable") + assert_true(pd.enumerable, "enumerable") + assert_false(pd.configurable, "configurable") + }, "Constant " + name + " on " + description) + }) + }) +}) |