summaryrefslogtreecommitdiff
path: root/test/built-ins/Function/prototype/bind/15.3.4.5-15-4.js
blob: 6e12d4557c313a256f0302c628232b25ce9a15d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright (c) 2012 Ecma International.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
es5id: 15.3.4.5-15-4
description: >
    Function.prototype.bind - The [[Enumerable]] attribute of length
    property in F set as false
includes: [runTestCase.js]
---*/

function testcase() {

        var canEnumerable = false;
        var hasProperty = false;
        function foo() { }
        var obj = foo.bind({});
        hasProperty = obj.hasOwnProperty("length");
        for (var prop in obj) {
            if (prop === "length") {
                canEnumerable = true;
            }
        }
        return hasProperty && !canEnumerable;
    }
runTestCase(testcase);