1 // Any copyright is dedicated to the Public Domain.
2 // http://creativecommons.org/licenses/publicdomain/
4 //-----------------------------------------------------------------------------
5 var BUGNUMBER = 580200;
7 'Assertion failure enumerating own properties of proxy returning ' +
8 'duplicated own property name';
9 print(BUGNUMBER + ": " + summary);
15 var x = Proxy.create({ keys: function() { return ["0","0"]; } }, [1,2]);
16 var ax = Object.keys(x);
17 assertEq(ax.length, 1, "array: " + ax);
20 var p = Proxy.create({ keys: function() { return ["1","1"]; } }, null);
21 var ap = Object.keys(p);
22 assertEq(ap.length, 1, "array: " + ap);
25 var x = Proxy.create({ getOwnPropertyNames: function() { return ["0","0"]; } }, [1,2]);
26 var ax = Object.getOwnPropertyNames(x);
27 assertEq(ax.length, 1, "array: " + ax);
30 var p = Proxy.create({ getOwnPropertyNames: function() { return ["1","1"]; } }, null);
31 var ap = Object.getOwnPropertyNames(p);
32 assertEq(ap.length, 1, "array: " + ap);
35 /******************************************************************************/
37 if (typeof reportCompare === "function")
38 reportCompare(true, true);
40 print("All tests passed!");