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 * Operator uses GetValue
6 *
7 * @path ch11/11.14/S11.14_A2.1_T1.js
8 * @description Either Expression is not Reference or GetBase is not null
9 */
11 //CHECK#1
12 if ((1,2) !== 2) {
13 $ERROR('#1: (1,2) === 2. Actual: ' + ((1,2)));
14 }
16 //CHECK#2
17 var x = 1;
18 if ((x, 2) !== 2) {
19 $ERROR('#2: var x = 1; (x, 2) === 2. Actual: ' + ((x, 2)));
20 }
22 //CHECK#3
23 var y = 2;
24 if ((1, y) !== 2) {
25 $ERROR('#3: var y = 2; (1, y) === 2. Actual: ' + ((1, y)));
26 }
28 //CHECK#4
29 var x = 1;
30 var y = 2;
31 if ((x, y) !== 2) {
32 $ERROR('#4: var x = 1; var y = 2; (x, y) === 2. Actual: ' + ((x, y)));
33 }
35 //CHECK#5
36 var x = 1;
37 if ((x, x) !== 1) {
38 $ERROR('#5: var x = 1; (x, x) === 1. Actual: ' + ((x, x)));
39 }
41 //CHECK#6
42 var objectx = new Object();
43 var objecty = new Object();
44 objectx.prop = true;
45 objecty.prop = 1.1;
46 if ((objectx.prop = false, objecty.prop) !== objecty.prop) {
47 $ERROR('#6: var objectx = new Object(); var objecty = new Object(); objectx.prop = true; objecty.prop = 1; (objectx.prop = false, objecty.prop) === objecty.prop. Actual: ' + ((objectx.prop = false, objecty.prop)));
48 } else {
49 if (objectx.prop !== false) {
50 $ERROR('#6: var objectx = new Object(); var objecty = new Object(); objectx.prop = true; objecty.prop = 1; objectx.prop = false, objecty.prop; objectx.prop === false');
51 }
52 }