From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- .../proxy/testDirectProxyGetOwnPropertyNames1.js | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames1.js (limited to 'js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames1.js') diff --git a/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames1.js b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames1.js new file mode 100644 index 000000000..11618c876 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames1.js @@ -0,0 +1,30 @@ +// Forward to the target if the trap is not defined +var objAB = Object.create(null, { + a: { + enumerable: true, + configurable: true + }, + b: { + enumerable: false, + configurable: true + } +}); + +var objCD = Object.create(objAB, { + c: { + enumerable: true, + configurable: true + }, + d: { + enumerable: false, + configurable: true + } +}); + +objCD[Symbol("moon")] = "something"; +for (let p of [new Proxy(objCD, {}), Proxy.revocable(objCD, {}).proxy]) { + var names = Object.getOwnPropertyNames(p); + assertEq(names.length, 2); + assertEq(names[0], 'c'); + assertEq(names[1], 'd'); +} -- cgit v1.2.3