diff options
Diffstat (limited to 'js/src/tests/js1_8_5/extensions/regress-604781-2.js')
-rw-r--r-- | js/src/tests/js1_8_5/extensions/regress-604781-2.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/js/src/tests/js1_8_5/extensions/regress-604781-2.js b/js/src/tests/js1_8_5/extensions/regress-604781-2.js new file mode 100644 index 000000000..7aba4a274 --- /dev/null +++ b/js/src/tests/js1_8_5/extensions/regress-604781-2.js @@ -0,0 +1,13 @@ +// Any copyright is dedicated to the Public Domain. +// http://creativecommons.org/licenses/publicdomain/ + +var log; +function watcher(id, old, newval) { log += 'watcher'; return newval; } +var o = { set x(v) { log += 'setter'; } }; +o.watch('x', watcher); +Object.defineProperty(o, 'x', {value: 3, writable: true}); +log = ''; +o.x = 3; +assertEq(log, 'watcher'); + +reportCompare(0, 0, 'ok'); |