michael@0: // Copyright 2009 the Sputnik authors. All rights reserved. michael@0: // This code is governed by the BSD license found in the LICENSE file. michael@0: michael@0: /** michael@0: * Properties of the [[Prototype]] object michael@0: * are visible as properties of the child object for the purposes of get access, but not for put access michael@0: * michael@0: * @path ch08/8.6/8.6.2/S8.6.2_A2.js michael@0: * @description Check visibility properties of the child object for the purposes of get access, but not for put access michael@0: */ michael@0: michael@0: //Establish foo object michael@0: function FooObj(){}; michael@0: FooObj.prototype.prop="some"; michael@0: michael@0: // Invoke instance of foo object michael@0: var foo= new FooObj; michael@0: michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //CHECK#1 michael@0: if (foo.prop !== "some"){ michael@0: $ERROR('#1: function FooObj(){}; FooObj.prototype.prop="some"; var foo= new FooObj; foo.prop === "some". Actual: ' + (foo.prop)); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //CHECK#2 michael@0: foo.prop=true; michael@0: // Invoke another instance of foo object michael@0: var foo__ = new FooObj; michael@0: if (foo__.prop !== "some"){ michael@0: $ERROR('#2: function FooObj(){}; FooObj.prototype.prop="some"; var foo= new FooObj; foo.prop=true; var foo__ = new FooObj; foo__.prop === "some". Actual: ' + (foo__.prop)); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: