diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/proxy/testDirectProxySet2.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/proxy/testDirectProxySet2.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,20 @@ +/* + * Call the trap with the handler as the this value, the target as the first + * argument, the name of the property as the second argument, the value as the + * third argument, and the receiver as the fourth argument + */ +var target = {}; +var called = false; +var handler = { + set: function (target1, name, val, receiver) { + assertEq(this, handler); + assertEq(target1, target); + assertEq(name, 'foo'); + assertEq(val, 'baz'); + assertEq(receiver, proxy); + called = true; + } +}; +var proxy = new Proxy(target, handler); +proxy['foo'] = 'baz'; +assertEq(called, true);