Index: LayoutTests/fast/dom/global-constructors-listing.html |
diff --git a/LayoutTests/fast/dom/global-constructors-listing.html b/LayoutTests/fast/dom/global-constructors-listing.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..35a6397c3325d928087819d570bb8d5e004ec62c |
--- /dev/null |
+++ b/LayoutTests/fast/dom/global-constructors-listing.html |
@@ -0,0 +1,27 @@ |
+<html> |
+<body> |
+<script src="../js/resources/js-test-pre.js"></script> |
+<script> |
+description("This test documents the Constructor properties on the global window object."); |
+ |
+function isConstructor(propertyName) { |
+ var descriptor = Object.getOwnPropertyDescriptor(window, propertyName); |
+ if (descriptor.value == undefined || descriptor.value.prototype == undefined) |
+ return false; |
+ return descriptor.writable && !descriptor.enumerable && descriptor.configurable; |
+} |
+ |
+var constructorNames = []; |
+var propertyNames = Object.getOwnPropertyNames(window); |
+for (var i = 0; i < propertyNames.length; i++) { |
+ if (isConstructor(propertyNames[i])) |
+ constructorNames[constructorNames.length] = propertyNames[i]; |
+} |
+ |
+constructorNames.sort(); |
+for (var i = 0; i < constructorNames.length; i++) |
+ debug(constructorNames[i]); |
+</script> |
+<script src="../js/resources/js-test-post.js"></script> |
+</body> |
+</html> |