diff options
Diffstat (limited to 'test/built-ins/Array/prototype/reduce/15.4.4.21-2-15.js')
-rw-r--r-- | test/built-ins/Array/prototype/reduce/15.4.4.21-2-15.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-15.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-15.js index 136c455d5..215377cc4 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-15.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-15.js @@ -4,17 +4,16 @@ /*--- es5id: 15.4.4.21-2-15 description: Array.prototype.reduce - 'length' is property of the global object -includes: [fnGlobalObject.js] ---*/ function callbackfn(prevVal, curVal, idx, obj) { return (obj.length === 2); } - var oldLen = fnGlobalObject().length; - fnGlobalObject()[0] = 12; - fnGlobalObject()[1] = 11; - fnGlobalObject()[2] = 9; - fnGlobalObject().length = 2; + var oldLen = this.length; + this[0] = 12; + this[1] = 11; + this[2] = 9; + this.length = 2; -assert.sameValue(Array.prototype.reduce.call(fnGlobalObject(), callbackfn, 1), true, 'Array.prototype.reduce.call(fnGlobalObject(), callbackfn, 1)'); +assert.sameValue(Array.prototype.reduce.call(this, callbackfn, 1), true, 'Array.prototype.reduce.call(this, callbackfn, 1)'); |