diff options
Diffstat (limited to 'js/src/jit-test/tests/debug/Object-defineProperty-01.js')
-rw-r--r-- | js/src/jit-test/tests/debug/Object-defineProperty-01.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/debug/Object-defineProperty-01.js b/js/src/jit-test/tests/debug/Object-defineProperty-01.js new file mode 100644 index 0000000000..91330694b9 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-defineProperty-01.js @@ -0,0 +1,12 @@ +// obj.defineProperty can define simple data properties. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger; +var gobj = dbg.addDebuggee(g); +gobj.defineProperty("x", {configurable: true, enumerable: true, writable: true, value: 'ok'}); +assertEq(g.x, 'ok'); + +var desc = g.Object.getOwnPropertyDescriptor(g, "x"); +assertEq(desc.configurable, true); +assertEq(desc.enumerable, true); +assertEq(desc.writable, true); |