diff options
Diffstat (limited to 'js/src/jit-test/tests/debug/Object-defineProperty-14.js')
-rw-r--r-- | js/src/jit-test/tests/debug/Object-defineProperty-14.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/debug/Object-defineProperty-14.js b/js/src/jit-test/tests/debug/Object-defineProperty-14.js new file mode 100644 index 000000000..193824b08 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-defineProperty-14.js @@ -0,0 +1,15 @@ +// defineProperty accepts undefined for desc.get/set. + +load(libdir + "asserts.js"); + +var g = newGlobal(); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); + +gw.defineProperty("p", {get: undefined, set: undefined}); + +var desc = g.eval("Object.getOwnPropertyDescriptor(this, 'p')"); +assertEq("get" in desc, true); +assertEq("set" in desc, true); +assertEq(desc.get, undefined); +assertEq(desc.set, undefined); |