blob: 641e5b837c73998e590c51d539dedea1ae3ec576 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// obj.getOwnPropertyDescriptor works on accessor properties.
var g = newGlobal();
var dbg = new Debugger;
var gdo = dbg.addDebuggee(g);
g.called = false;
g.eval("var a = {get x() { called = true; }};");
var desc = gdo.getOwnPropertyDescriptor("a").value.getOwnPropertyDescriptor("x");
assertEq(g.called, false);
assertEq(desc.enumerable, true);
assertEq(desc.configurable, true);
assertEq("value" in desc, false);
assertEq("writable" in desc, false);
assertEq(desc.get instanceof Debugger.Object, true);
assertEq(desc.get.class, "Function");
assertEq(desc.set, undefined);
|