| 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 has the attributes { DontEnum } |
| 6 |
es5id: 15.3.5.1_A4_T1 |
| 7 |
description: > |
| 8 |
Checking if enumerating the length property of |
| 9 |
Function("arg1,arg2,arg3", null) fails |
| 10 |
---*/ |
| 11 |
|
| 12 |
var f = new Function("arg1,arg2,arg3", null); |
| 13 |
|
| 14 |
//CHECK#1 |
| 15 |
if (!(f.hasOwnProperty('length'))) { |
| 16 |
$ERROR('#1: the function has length property.'); |
| 17 |
} |
| 18 |
|
| 19 |
for (var key in f) { |
| 20 |
if (key == "length") { |
| 21 |
var lengthenumed = true; |
| 22 |
} |
| 23 |
} |
| 24 |
//CHECK#2 |
| 25 |
if (lengthenumed) { |
| 26 |
$ERROR('#2: the length property has the attributes { DontEnum }'); |
| 27 |
} |