| 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 |
info: The length property of eval does not have the attribute DontDelete |
| 6 |
es5id: 15.1.2.1_A4.2 |
| 7 |
es6id: 18.2.1 |
| 8 |
esid: sec-eval-x |
| 9 |
description: Checking use hasOwnProperty, delete |
| 10 |
---*/ |
| 11 |
|
| 12 |
//CHECK#1 |
| 13 |
if (eval.hasOwnProperty('length') !== true) { |
| 14 |
$ERROR('#1: eval.hasOwnProperty(\'length\') === true. Actual: ' + (eval.hasOwnProperty('length'))); |
| 15 |
} |
| 16 |
|
| 17 |
delete eval.length; |
| 18 |
|
| 19 |
//CHECK#2 |
| 20 |
if (eval.hasOwnProperty('length') !== false) { |
| 21 |
$ERROR('#2: delete eval.length; eval.hasOwnProperty(\'length\') === false. Actual: ' + (eval.hasOwnProperty('length'))); |
| 22 |
} |
| 23 |
|
| 24 |
//CHECK#3 |
| 25 |
if (eval.length === undefined) { |
| 26 |
$ERROR('#3: delete eval.length; eval.length !== undefined'); |
| 27 |
} |