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 * Variables are defined with global scope (that is, they are created as members of the global object, as described in 10.1.3) using property attributes { DontDelete}
6 *
7 * @path ch12/12.2/S12.2_A2.js
8 * @description Checking if deleting global variables that have the attributes {DontDelete} fails
9 */
11 //////////////////////////////////////////////////////////////////////////////
12 //CHECK#1
13 if (delete(__variable)) {
14 $ERROR('#1: delete(__variable)===false');
15 }
16 //
17 //////////////////////////////////////////////////////////////////////////////
19 //////////////////////////////////////////////////////////////////////////////
20 //CHECK#2
21 if (delete(this["__variable"])) {
22 $ERROR('#2: delete(this["__variable"])===false');
23 }
24 //
25 //////////////////////////////////////////////////////////////////////////////
28 var __variable;
29 var __variable = "defined";
31 //////////////////////////////////////////////////////////////////////////////
32 //CHECK#3
33 if (delete(__variable) | delete(this["__variable"])) {
34 $ERROR('#3: (delete(__variable) | delete(this["__variable"]))===false' );
35 }
36 //
37 //////////////////////////////////////////////////////////////////////////////
39 //////////////////////////////////////////////////////////////////////////////
40 //CHECK#4
41 if ((__variable !== "defined")|(this["__variable"] !=="defined")) {
42 $ERROR('#4: __variable === "defined" and this["__variable"] ==="defined"');
43 }
44 //
45 //////////////////////////////////////////////////////////////////////////////