blob: 78f5d9efa2ae92d0f7f9e27a66890e932cda0f11 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// obj.getOwnPropertyDescriptor works on global objects.
var g = newGlobal();
g.eval("var v;");
this.eval("var v;");
var dbg = Debugger();
var obj = dbg.addDebuggee(g);
function test(name) {
var desc = obj.getOwnPropertyDescriptor(name);
assertEq(desc instanceof Object, true);
var expected = Object.getOwnPropertyDescriptor(this, name);
assertEq(Object.prototype.toString.call(desc), Object.prototype.toString.call(expected));
assertEq(desc.enumerable, expected.enumerable);
assertEq(desc.configurable, expected.configurable);
assertEq(desc.writable, expected.writable);
assertEq(desc.value, expected.value);
}
test("Infinity");
test("v");
|