Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Unified Diff: test/mjsunit/array-push.js

Issue 1774015: Bring r4503 to the 2.1 branch.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/2.1/
Patch Set: Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/array-pop.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/array-push.js
===================================================================
--- test/mjsunit/array-push.js (revision 4551)
+++ test/mjsunit/array-push.js (working copy)
@@ -103,3 +103,13 @@
assertEquals(29, a.push(29));
}
})();
+
+// Test the case of not JSArray receiver.
+// Regression test for custom call generators, see issue 684.
+(function() {
+ var x = {__proto__: []};
+ for (var i = 0; i < 100; i++) {
+ x.push("a");
+ assertEquals(i + 1, x.length, i + 'th iteration');
+ }
+})();
« no previous file with comments | « test/mjsunit/array-pop.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698