diff --git a/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.html b/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.html
index f3c998f732b246..459b7be7637dee 100644
--- a/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.html
+++ b/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.html
@@ -2,6 +2,7 @@
DOMException constants
+
@@ -35,14 +36,21 @@
"INVALID_NODE_TYPE_ERR",
"DATA_CLONE_ERR"
]
+ var objects = [
+ [DOMException, "DOMException constructor object"],
+ [DOMException.prototype, "DOMException prototype object"]
+ ]
constants.forEach(function(name, i) {
- test(function() {
- assert_equals(DOMException[name], i + 1, name)
- var pd = Object.getOwnPropertyDescriptor(DOMException, name)
- assert_equals(pd.writable, false, "not writable")
- assert_equals(pd.enumerable, true, "enumerable")
- assert_equals(pd.configurable, false, "not configurable")
- }, "Constant: " + name)
+ objects.forEach(function(o) {
+ var object = o[0], description = o[1];
+ test(function() {
+ assert_equals(object[name], i + 1, name)
+ var pd = Object.getOwnPropertyDescriptor(object, name)
+ assert_equals(pd.writable, false, "not writable")
+ assert_equals(pd.enumerable, true, "enumerable")
+ assert_equals(pd.configurable, false, "not configurable")
+ }, "Constant " + name + " on " + description)
+ })
})
})