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

Unified Diff: test/mjsunit/object-define-property.js

Issue 5861006: Change Object.defineProperty to accept undefined as getters and setters and t... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years 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/v8natives.js ('k') | test/mjsunit/regress/regress-687.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/object-define-property.js
===================================================================
--- test/mjsunit/object-define-property.js (revision 6043)
+++ test/mjsunit/object-define-property.js (working copy)
@@ -74,7 +74,7 @@
// Descriptors.
var emptyDesc = {};
-var accessorConfigurable = {
+var accessorConfigurable = {
set: setter1,
get: getter1,
configurable: true
@@ -83,7 +83,7 @@
var accessorNoConfigurable = {
set: setter2,
get: getter2,
- configurable: false
+ configurable: false
};
var accessorOnlySet = {
@@ -234,7 +234,7 @@
assertEquals(1, obj1.setOnly = 1);
assertEquals(2, val3);
-// The above should also work if redefining just a getter or setter on
+// The above should also work if redefining just a getter or setter on
// an existing property with both a getter and a setter.
Object.defineProperty(obj1, "both", accessorConfigurable);
@@ -384,7 +384,7 @@
assertEquals(desc.set, undefined);
-// Redefinition of an accessor defined using __defineGetter__ and
+// Redefinition of an accessor defined using __defineGetter__ and
// __defineSetter__.
function get(){return this.x}
function set(x){this.x=x};
@@ -462,7 +462,7 @@
// Test runtime calls to DefineOrRedefineDataProperty and
-// DefineOrRedefineAccessorProperty - make sure we don't
+// DefineOrRedefineAccessorProperty - make sure we don't
// crash.
try {
%DefineOrRedefineAccessorProperty(0, 0, 0, 0, 0);
@@ -511,7 +511,7 @@
// Test that all possible differences in step 6 in DefineOwnProperty are
// exercised, i.e., any difference in the given property descriptor and the
// existing properties should not return true, but throw an error if the
-// existing configurable property is false.
+// existing configurable property is false.
var obj5 = {};
// Enumerable will default to false.
@@ -727,7 +727,7 @@
var descElementNonConfigurable = { value: 'barfoo', configurable: false };
var descElementNonWritable = { value: 'foofoo', writable: false };
var descElementNonEnumerable = { value: 'barbar', enumerable: false };
-var descElementAllFalse = { value: 'foofalse',
+var descElementAllFalse = { value: 'foofalse',
configurable: false,
writable: false,
enumerable: false };
@@ -790,7 +790,7 @@
// Make sure that we can't redefine using direct access.
obj6[15] ='overwrite';
-assertEquals(obj6[15],'foobar');
+assertEquals(obj6[15],'foobar');
// Repeat the above tests on an array.
@@ -805,7 +805,7 @@
var descElementNonConfigurable = { value: 'barfoo', configurable: false };
var descElementNonWritable = { value: 'foofoo', writable: false };
var descElementNonEnumerable = { value: 'barbar', enumerable: false };
-var descElementAllFalse = { value: 'foofalse',
+var descElementAllFalse = { value: 'foofalse',
configurable: false,
writable: false,
enumerable: false };
@@ -898,4 +898,3 @@
assertEquals(undefined, o.x);
o.x = 37;
assertEquals(undefined, o.x);
-
« no previous file with comments | « src/v8natives.js ('k') | test/mjsunit/regress/regress-687.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698