Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(560)

Unified Diff: test/mjsunit/regexp-string-methods.js

Issue 39010: Removed some handlers and made regexp.test avoid creating a result array. (Closed)
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/jsregexp.cc ('K') | « src/regexp-delay.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regexp-string-methods.js
diff --git a/test/mjsunit/regexp-string-methods.js b/test/mjsunit/regexp-string-methods.js
index 274e64b5ba2a3ef059d2f163f1753736b8e22409..ef3bf6eaf18a1114f7b1b83fd7f401081a176b38 100644
--- a/test/mjsunit/regexp-string-methods.js
+++ b/test/mjsunit/regexp-string-methods.js
@@ -44,6 +44,8 @@ assertTrue(f2.ignoreCase);
// On the other hand test is defined in a semi-coherent way as a call to exec.
// 15.10.6.3
-// SpiderMonkey fails this one.
+// We match other browsers in using the original value of RegExp.prototype.exec.
+// I.e., RegExp.prototype.test shouldn't use the current value of
+// RegExp.prototype.exec.
RegExp.prototype.exec = function(string) { return 'x'; }
-assertTrue(/f/.test('x'));
+assertFalse(/f/.test('x'));
« src/jsregexp.cc ('K') | « src/regexp-delay.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698