summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Object-deleteProperty-01.js
blob: 65a465b75ed2f281eec8a946f7d53e59a73fd78d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Basic deleteProperty tests.

var g = newGlobal({newCompartment: true});
var dbg = new Debugger;
var gw = dbg.addDebuggee(g);

assertEq(gw.deleteProperty("no such property"), true);

g.Object.defineProperty(g, "p", {configurable: true, value: 0});
assertEq(gw.deleteProperty("p"), true);

g[0] = 0;
assertEq(gw.deleteProperty(0), true);
assertEq("0" in g, false);

assertEq(gw.deleteProperty(), false);  // can't delete g.undefined
assertEq(g.undefined, undefined);