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

Unified Diff: test/mjsunit/es6/regexp-tostring.js

Issue 1688163003: [regexp] Fix RegExp.prototype.toString. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« no previous file with comments | « src/js/regexp.js ('k') | test/mjsunit/regexp.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/regexp-tostring.js
diff --git a/test/mjsunit/es6/regexp-tostring.js b/test/mjsunit/es6/regexp-tostring.js
index 8e6857ee89b8a2045dba7e7af10321ac65c5be93..3deeeb7ed8894d440d3fabd1172da5203d829c39 100644
--- a/test/mjsunit/es6/regexp-tostring.js
+++ b/test/mjsunit/es6/regexp-tostring.js
@@ -6,7 +6,7 @@ var log = [];
var fake =
{
- pattern: function() {
+ get source() {
log.push("p");
return {
toString: function() {
@@ -15,7 +15,7 @@ var fake =
}
};
},
- flags: function() {
+ get flags() {
log.push("f");
return {
toString: function() {
@@ -38,8 +38,8 @@ function testThrows(x) {
testThrows(1);
testThrows(null);
-Number.prototype.pattern = () => "a";
-Number.prototype.flags = () => "b";
+Number.prototype.source = "a";
+Number.prototype.flags = "b";
testThrows(1);
assertEquals("/pattern/flags", RegExp.prototype.toString.call(fake));
« no previous file with comments | « src/js/regexp.js ('k') | test/mjsunit/regexp.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698