|
1 // Copyright 2009 the Sputnik authors. All rights reserved. |
|
2 // This code is governed by the BSD license found in the LICENSE file. |
|
3 |
|
4 /** |
|
5 * Variable instantiation is performed using the global object as |
|
6 * the variable object and using property attributes { DontDelete } |
|
7 * |
|
8 * @path ch10/10.4/10.4.1/S10.4.1_A1_T1.js |
|
9 * @description Checking if deleting variable x, that is defined as var x = 1, fails |
|
10 * @noStrict |
|
11 */ |
|
12 |
|
13 var x = 1; |
|
14 |
|
15 if (this.x !== 1) { |
|
16 $ERROR("#1: variable x is a property of global object"); |
|
17 } |
|
18 |
|
19 if(delete this.x !== false){ |
|
20 $ERROR("#2: variable x has property attribute DontDelete"); |
|
21 } |
|
22 |