diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames2.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames2.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,16 @@ +/* + * Call the trap with the handler as the this value, and the target as the first + * argument + */ +var target = {}; +var called = false; +var handler = { + getOwnPropertyNames: function (target1) { + assertEq(this, handler); + assertEq(target1, target); + called = true; + return []; + } +}; +assertEq(Object.getOwnPropertyNames(new Proxy(target, handler)).length, 0); +assertEq(called, true);