From 723ecef136330300fbacbbb9c86d218515543683 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Tue, 6 Jan 2015 09:51:17 +0100 Subject: [PATCH] Test the constants on the DOMException prototype object. --- .../es-exceptions/DOMException-constants.html | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) 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) + }) }) })