Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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 * Using arguments object within a "with" Expression that is nested in a function is admitted
6 *
7 * @path ch13/13.2/S13.2.2_A18_T2.js
8 * @description Object is declared with "__obj={callee:"a"}"
9 */
11 this.callee = 0;
12 var b;
14 __obj={callee:"a"};
16 function f(){
17 with (arguments){
18 callee=1;
19 b=true;
20 return arguments;
21 }
22 };
24 result=f(__obj);
26 //////////////////////////////////////////////////////////////////////////////
27 //CHECK#1
28 if (callee !== 0) {
29 $ERROR('#1: callee === 0. Actual: callee ==='+callee);
30 }
31 //
32 //////////////////////////////////////////////////////////////////////////////
34 //////////////////////////////////////////////////////////////////////////////
35 //CHECK#2
36 if (__obj.callee !== "a") {
37 $ERROR('#2: __obj.callee === "a". Actual: __obj.callee ==='+__obj.callee);
38 }
39 //
40 //////////////////////////////////////////////////////////////////////////////
42 //////////////////////////////////////////////////////////////////////////////
43 //CHECK#3
44 if (result.callee !== 1) {
45 $ERROR('#3: result.callee === 1. Actual: result.callee ==='+result.callee);
46 }
47 //
48 //////////////////////////////////////////////////////////////////////////////
50 //////////////////////////////////////////////////////////////////////////////
51 //CHECK#4
52 if (!(this.b)) {
53 $ERROR('#4: this.b === true. Actual: this.b ==='+this.b);
54 }
55 //
56 //////////////////////////////////////////////////////////////////////////////