michael@0: load(libdir + "asserts.js"); michael@0: michael@0: /* michael@0: * Throw a TypeError if the trap reports a new own property on a non-extensible michael@0: * object michael@0: */ michael@0: var target = {}; michael@0: Object.preventExtensions(target); michael@0: assertThrowsInstanceOf(function () { michael@0: ({}).hasOwnProperty.call(new Proxy(target, { michael@0: hasOwn: function (target, name) { michael@0: return true; michael@0: } michael@0: }), 'foo'); michael@0: }, TypeError);