summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Object-defineProperty-14.js
blob: 193824b0894133996c0cccbb43ec7da70f624e2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// defineProperty accepts undefined for desc.get/set.

load(libdir + "asserts.js");

var g = newGlobal();
var dbg = new Debugger;
var gw = dbg.addDebuggee(g);

gw.defineProperty("p", {get: undefined, set: undefined});

var desc = g.eval("Object.getOwnPropertyDescriptor(this, 'p')");
assertEq("get" in desc, true);
assertEq("set" in desc, true);
assertEq(desc.get, undefined);
assertEq(desc.set, undefined);