Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 // defineProperty throws if a getter or setter is neither undefined nor callable.
3 load(libdir + "asserts.js");
5 var g = newGlobal();
6 var dbg = new Debugger;
7 var gw = dbg.addDebuggee(g);
9 for (let v of [null, false, 'bad', 0, 2.76, {}]) {
10 assertThrowsInstanceOf(function () {
11 gw.defineProperty("p", {configurable: true, get: v});
12 }, TypeError);
13 assertThrowsInstanceOf(function () {
14 gw.defineProperty("p", {configurable: true, set: v});
15 }, TypeError);
16 }