diff options
Diffstat (limited to 'test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-23.js')
-rw-r--r-- | test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-23.js | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-23.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-23.js index 0b4a011ae..a9d706667 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-23.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-23.js @@ -4,17 +4,16 @@ /*--- es5id: 15.4.4.14-9-b-i-23 description: Array.prototype.indexOf - This object is the global object -includes: [fnGlobalObject.js] ---*/ var targetObj = {}; - var oldLen = fnGlobalObject().length; - fnGlobalObject()[0] = targetObj; - fnGlobalObject()[100] = "100"; - fnGlobalObject()[200] = "200"; - fnGlobalObject().length = 200; + var oldLen = this.length; + this[0] = targetObj; + this[100] = "100"; + this[200] = "200"; + this.length = 200; -assert.sameValue(Array.prototype.indexOf.call(fnGlobalObject(), targetObj), 0, 'Array.prototype.indexOf.call(fnGlobalObject(), targetObj)'); -assert.sameValue(Array.prototype.indexOf.call(fnGlobalObject(), "100"), 100, 'Array.prototype.indexOf.call(fnGlobalObject(), "100")'); -assert.sameValue(Array.prototype.indexOf.call(fnGlobalObject(), "200"), -1, 'Array.prototype.indexOf.call(fnGlobalObject(), "200")'); +assert.sameValue(Array.prototype.indexOf.call(this, targetObj), 0, 'Array.prototype.indexOf.call(this, targetObj)'); +assert.sameValue(Array.prototype.indexOf.call(this, "100"), 100, 'Array.prototype.indexOf.call(this, "100")'); +assert.sameValue(Array.prototype.indexOf.call(this, "200"), -1, 'Array.prototype.indexOf.call(this, "200")'); |