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

Unified Diff: test/mjsunit/object-prevent-extensions.js

Issue 9420045: After assignment return right hand side value instead of undefined when Object.isExtensible(o) === … (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 10 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/objects.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/object-prevent-extensions.js
===================================================================
--- test/mjsunit/object-prevent-extensions.js (revision 10736)
+++ test/mjsunit/object-prevent-extensions.js (working copy)
@@ -114,3 +114,11 @@
foo.x = 29;
assertEquals(undefined, foo.x);
+
+// http://es5.github.com/#x11.13.1
+// when Object.isExtensible(o) === false
+// assignment should return right hand side value
+var o = Object.preventExtensions({});
+var v = o.v = 50;
+assertEquals(undefined, o.v);
+assertEquals(50, v);
rossberg 2012/02/17 12:39:35 Can you add a test for integer properties, too? Be
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698