|
1 // Copyright 2009 the Sputnik authors. All rights reserved. |
|
2 // This code is governed by the BSD license found in the LICENSE file. |
|
3 |
|
4 /** |
|
5 * The value of the internal [[Prototype]] property of the |
|
6 * created arguments object is the original Object prototype object, the one |
|
7 * that is the initial value of Object.prototype |
|
8 * |
|
9 * @path ch10/10.6/S10.6_A2.js |
|
10 * @description Checking arguments.constructor.prototype===Object.prototype |
|
11 */ |
|
12 |
|
13 //CHECK#1 |
|
14 function f1(){ |
|
15 return arguments.constructor.prototype; |
|
16 } |
|
17 try{ |
|
18 if(f1() !== Object.prototype){ |
|
19 $ERROR('#1: arguments.constructor.prototype === Object.prototype'); |
|
20 } |
|
21 } |
|
22 catch(e){ |
|
23 $ERROR("#1: arguments doesn't exists"); |
|
24 } |
|
25 |
|
26 //CHECK#2 |
|
27 var f2 = function(){return arguments.constructor.prototype;}; |
|
28 try{ |
|
29 if(f2() !== Object.prototype){ |
|
30 $ERROR('#2: arguments.constructor.prototype === Object.prototype'); |
|
31 } |
|
32 } |
|
33 catch(e){ |
|
34 $ERROR("#2: arguments doesn't exists"); |
|
35 } |
|
36 |