michael@0: // Check Debugger.Object.prototype.unwrap surfaces. michael@0: michael@0: load(libdir + 'asserts.js'); michael@0: michael@0: var dbg = new Debugger(); michael@0: var g = newGlobal(); michael@0: var gw = dbg.addDebuggee(g); michael@0: michael@0: assertEq(Object.getOwnPropertyDescriptor(gw, 'unwrap'), undefined); michael@0: var d = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(gw), 'unwrap'); michael@0: assertEq(d.enumerable, false); michael@0: assertEq(d.configurable, true); michael@0: assertEq(d.writable, true); michael@0: michael@0: assertEq(typeof gw.unwrap, "function"); michael@0: assertEq(gw.unwrap.length, 0); michael@0: assertEq(gw.unwrap.name, "unwrap"); michael@0: michael@0: // It can be called. michael@0: gw.unwrap(); michael@0: michael@0: // You shouldn't be able to apply the accessor to the prototype. michael@0: assertThrowsInstanceOf(function () { Debugger.Object.prototype.unwrap(); }, TypeError);