Wed, 31 Dec 2014 07:53:36 +0100
Correct small whitespace inconsistency, lost while renaming variables.
michael@0 | 1 | // Copyright 2009 the Sputnik authors. All rights reserved. |
michael@0 | 2 | // This code is governed by the BSD license found in the LICENSE file. |
michael@0 | 3 | |
michael@0 | 4 | /** |
michael@0 | 5 | * Properties of the [[Prototype]] object |
michael@0 | 6 | * are visible as properties of the child object for the purposes of get access, but not for put access |
michael@0 | 7 | * |
michael@0 | 8 | * @path ch08/8.6/8.6.2/S8.6.2_A2.js |
michael@0 | 9 | * @description Check visibility properties of the child object for the purposes of get access, but not for put access |
michael@0 | 10 | */ |
michael@0 | 11 | |
michael@0 | 12 | //Establish foo object |
michael@0 | 13 | function FooObj(){}; |
michael@0 | 14 | FooObj.prototype.prop="some"; |
michael@0 | 15 | |
michael@0 | 16 | // Invoke instance of foo object |
michael@0 | 17 | var foo= new FooObj; |
michael@0 | 18 | |
michael@0 | 19 | ////////////////////////////////////////////////////////////////////////////// |
michael@0 | 20 | //CHECK#1 |
michael@0 | 21 | if (foo.prop !== "some"){ |
michael@0 | 22 | $ERROR('#1: function FooObj(){}; FooObj.prototype.prop="some"; var foo= new FooObj; foo.prop === "some". Actual: ' + (foo.prop)); |
michael@0 | 23 | } |
michael@0 | 24 | // |
michael@0 | 25 | ////////////////////////////////////////////////////////////////////////////// |
michael@0 | 26 | |
michael@0 | 27 | ////////////////////////////////////////////////////////////////////////////// |
michael@0 | 28 | //CHECK#2 |
michael@0 | 29 | foo.prop=true; |
michael@0 | 30 | // Invoke another instance of foo object |
michael@0 | 31 | var foo__ = new FooObj; |
michael@0 | 32 | if (foo__.prop !== "some"){ |
michael@0 | 33 | $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 | 34 | } |
michael@0 | 35 | // |
michael@0 | 36 | ////////////////////////////////////////////////////////////////////////////// |
michael@0 | 37 |