summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testArgumentsPropLookup.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/testArgumentsPropLookup.js')
-rw-r--r--js/src/jit-test/tests/basic/testArgumentsPropLookup.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/testArgumentsPropLookup.js b/js/src/jit-test/tests/basic/testArgumentsPropLookup.js
new file mode 100644
index 000000000..6e8a4cda7
--- /dev/null
+++ b/js/src/jit-test/tests/basic/testArgumentsPropLookup.js
@@ -0,0 +1,19 @@
+(function() {
+ var s = "__proto__";
+ assertEq(arguments[s], Object.prototype);
+})();
+
+Object.defineProperty(Object.prototype, "foo", {
+ get:function() {
+ this.bar = 42;
+ return 41
+ }
+});
+
+(function() {
+ var s = "foo";
+ assertEq(arguments[s], 41);
+ s = "bar";
+ assertEq(arguments[s], 42);
+ assertEq("bar" in Object.prototype, false);
+})();