Index: test/mjsunit/apply.js |
diff --git a/test/mjsunit/apply.js b/test/mjsunit/apply.js |
index c166110df062ea5f5a56d159b1567e056a6821b6..413ee937c6638cc7d30e2bf75e755a3a89a27d2a 100644 |
--- a/test/mjsunit/apply.js |
+++ b/test/mjsunit/apply.js |
@@ -190,3 +190,10 @@ assertEquals("morseper", |
"moreseper-prime"); |
delete(Array.prototype["1"]); |
+ |
+// Check correct handling of non-array argument lists. |
+assertSame(this, f0.apply(this, {}), "non-array-1"); |
+assertSame(this, f0.apply(this, { length:1 }), "non-array-2"); |
+assertEquals(void 0, f1.apply(this, { length:1 }), "non-array-3"); |
+assertEquals(void 0, f1.apply(this, { 0:"foo" }), "non-array-4"); |
+assertEquals("foo", f1.apply(this, { length:1, 0:"foo" }), "non-array-5"); |