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

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

Issue 3277005: Follow Safari and Firefox in returning empty array from array splice... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 4 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 | « src/builtins.cc ('k') | test/mjsunit/third_party/array-splice-webkit.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/array-splice.js
===================================================================
--- test/mjsunit/array-splice.js (revision 5365)
+++ test/mjsunit/array-splice.js (working copy)
@@ -67,13 +67,8 @@
(function() {
var array;
for (var i = 0; i < 7; i++) {
- // SpiderMonkey and JSC return undefined in the case where no
- // arguments are given instead of using the implicit undefined
- // arguments. This does not follow ECMA-262, but we do the same for
- // compatibility.
- // TraceMonkey follows ECMA-262 though.
array = [1, 2, 3]
- assertEquals(undefined, array.splice());
+ assertEquals([], array.splice());
assertEquals([1, 2, 3], array);
// SpiderMonkey, TraceMonkey and JSC treat the case where no delete count is
« no previous file with comments | « src/builtins.cc ('k') | test/mjsunit/third_party/array-splice-webkit.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698