summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/proxy/testDirectProxyDefineProperty7.js
blob: 8c05147c5720e3f3382c31d4c69f28240c752213 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Bug 1133085 - Test that descriptors are properly reconstituted
// when only .get or only .set is present.

load(libdir + "asserts.js");

var input, output;
var p = new Proxy({x: 0}, {
    defineProperty(t, k, desc) { output = desc; print("ok"); return true; }
});

input = {get: function () {}};
Object.defineProperty(p, "x", input);
assertDeepEq(output, input);

input = {set: function () {}};
Object.defineProperty(p, "x", input);
assertDeepEq(output, input);