js/src/tests/test262/ch10/10.6/S10.6_A2.js

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     1 // Copyright 2009 the Sputnik authors.  All rights reserved.
     2 // This code is governed by the BSD license found in the LICENSE file.
     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  */
    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 }
    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 }

mercurial