michael@0: // dumb basics of uncaughtExceptionHook michael@0: michael@0: load(libdir + 'asserts.js'); michael@0: michael@0: var desc = Object.getOwnPropertyDescriptor(Debugger.prototype, "uncaughtExceptionHook"); michael@0: assertEq(typeof desc.get, 'function'); michael@0: assertEq(typeof desc.set, 'function'); michael@0: michael@0: assertThrowsInstanceOf(function () { Debugger.prototype.uncaughtExceptionHook = null; }, TypeError); michael@0: michael@0: var g = newGlobal(); michael@0: var dbg = new Debugger(g); michael@0: assertEq(desc.get.call(dbg), null); michael@0: assertThrowsInstanceOf(function () { dbg.uncaughtExceptionHook = []; }, TypeError); michael@0: assertThrowsInstanceOf(function () { dbg.uncaughtExceptionHook = 3; }, TypeError); michael@0: dbg.uncaughtExceptionHook = Math.sin; michael@0: assertEq(dbg.uncaughtExceptionHook, Math.sin); michael@0: dbg.uncaughtExceptionHook = null; michael@0: assertEq(dbg.uncaughtExceptionHook, null);