diff options
Diffstat (limited to 'test/built-ins/String/prototype/match/S15.5.4.10_A1_T3.js')
-rw-r--r-- | test/built-ins/String/prototype/match/S15.5.4.10_A1_T3.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A1_T3.js b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T3.js index 32bf29539..dd8713565 100644 --- a/test/built-ins/String/prototype/match/S15.5.4.10_A1_T3.js +++ b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T3.js @@ -5,18 +5,17 @@ info: String.prototype.match (regexp) es5id: 15.5.4.10_A1_T3 description: Checking by using eval -includes: [fnGlobalObject.js] ---*/ -var match = String.prototype.match.bind(fnGlobalObject()); +var match = String.prototype.match.bind(this); try { - fnGlobalObject().toString = Object.prototype.toString; + this.toString = Object.prototype.toString; } catch (e) { ; } ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -if ((fnGlobalObject().toString === Object.prototype.toString) && //Ensure we could overwrite global obj's toString +if ((this.toString === Object.prototype.toString) && //Ensure we could overwrite global obj's toString (match(eval("\"bj\""))[0] !== "bj")) { $ERROR('#1: match = String.prototype.match.bind(this); match(eval("\\"bj\\""))[0] === "bj". Actual: '+match(eval("\"bj\""))[0] ); } |