tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

S13_A13_T3.js (958B)


      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 info: Deleting arguments[i] leads to breaking the connection to local reference
      6 es5id: 13_A13_T3
      7 description: >
      8    Changing argument value, deleting the argument and then defining a
      9    new value for arguments[i]
     10 ---*/
     11 
     12 function __func(__arg){
     13  __arg = 2;
     14  delete arguments[0];
     15  if (arguments[0] !== undefined) {
     16    throw new Test262Error('#1.1: arguments[0] === undefined');
     17  }
     18  arguments[0] = "A";
     19  if (arguments[0] !== "A") {
     20    throw new Test262Error('#1.2: arguments[0] === "A"');
     21  }
     22  return __arg;
     23 }
     24 
     25 //////////////////////////////////////////////////////////////////////////////
     26 //CHECK#1
     27 if (__func(1) !== 2) {
     28 throw new Test262Error('#1.3: __func(1) === 2. Actual: __func(1) ==='+__func(1));
     29 }
     30 //
     31 //////////////////////////////////////////////////////////////////////////////
     32 
     33 reportCompare(0, 0);