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 * Result of boolean conversion from undefined value is false
6 *
7 * @path ch09/9.2/S9.2_A1_T1.js
8 * @description Undefined, void and others are converted to Boolean by explicit transformation
9 */
11 // CHECK#1
12 if (Boolean(undefined) !== false) {
13 $ERROR('#1: Boolean(undefined) === false. Actual: ' + (Boolean(undefined)));
14 }
16 // CHECK#2
17 if (Boolean(void 0) !== false) {
18 $ERROR('#2: Boolean(undefined) === false. Actual: ' + (Boolean(undefined)));
19 }
21 // CHECK#3
22 if (Boolean(eval("var x")) !== false) {
23 $ERROR('#3: Boolean(eval("var x")) === false. Actual: ' + (Boolean(eval("var x"))));
24 }
26 // CHECK#4
27 if (Boolean() !== false) {
28 $ERROR('#4: Boolean() === false. Actual: ' + (Boolean()));
29 }