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 * FunctionExpression within a new statement is admitted
6 *
7 * @path ch13/13.2/S13.2.2_A16_T1.js
8 * @description Using "is __obj = new function __func(){this.prop=1;}" as FunctionExpression
9 */
11 //////////////////////////////////////////////////////////////////////////////
12 //CHECK#1
13 if (typeof __func !== "undefined") {
14 $ERROR('#1: typeof __func === "undefined". Actual: typeof __func ==='+typeof __func);
15 }
16 //
17 //////////////////////////////////////////////////////////////////////////////
19 var __obj = new function __func(){this.prop=1;};
21 //////////////////////////////////////////////////////////////////////////////
22 //CHECK#2
23 if (__obj.prop !== 1) {
24 $ERROR('#2: __obj.prop === 1. Actual: __obj.prop ==='+__obj.prop);
25 }
26 //
27 //////////////////////////////////////////////////////////////////////////////
29 //////////////////////////////////////////////////////////////////////////////
30 //CHECK#5
31 if (typeof __func !== "undefined") {
32 $ERROR('#5: typeof __func === "undefined". Actual: typeof __func ==='+typeof __func);
33 }
34 //
35 //////////////////////////////////////////////////////////////////////////////