diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/basic/proxy-assign-inherited.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/basic/proxy-assign-inherited.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,21 @@ +// When we assign to a property that a proxy claims is inherited, the +// defineProperty handler call to create the new own property should get +// the newly assigned value. + +var hits; +var handlers = { + getOwnPropertyDescriptor: function(name) { + return undefined; + }, + getPropertyDescriptor: function(name) { + return { value:42, writable:true, enumerable:true, configurable:true }; + }, + defineProperty: function(name, descriptor) { + hits++; + assertEq(name, 'x'); + assertEq(descriptor.value, 43); + } +}; +hits = 0; +Proxy.create(handlers).x = 43; +assertEq(hits, 1); \ No newline at end of file