summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/extensions/object-toSource-undefined-getter.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--js/src/tests/non262/extensions/object-toSource-undefined-getter.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/js/src/tests/non262/extensions/object-toSource-undefined-getter.js b/js/src/tests/non262/extensions/object-toSource-undefined-getter.js
new file mode 100644
index 0000000000..7c8e3289a4
--- /dev/null
+++ b/js/src/tests/non262/extensions/object-toSource-undefined-getter.js
@@ -0,0 +1,11 @@
+// |reftest| skip-if(!Object.prototype.toSource)
+
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/ */
+
+var desc = { get: undefined, set: undefined, configurable: true, enumerable: true };
+var obj = Object.defineProperty({}, "prop", desc);
+assertEq(obj.toSource(), "({})");
+
+if (typeof reportCompare === "function")
+ reportCompare(0, 0);