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

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

Issue 1846303002: Further ES2015 RegExp spec compliance fixes (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix cctest Created 4 years, 9 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 | « test/mjsunit/es6/regexp-constructor.js ('k') | test/mjsunit/es6/regexp-tostring.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/regexp-flags.js
diff --git a/test/mjsunit/es6/regexp-flags.js b/test/mjsunit/es6/regexp-flags.js
index ad40c43b69baf4fdfa82eb5c24df012fe177d448..480222d95a815b0821a0537d3206464143fce9d5 100644
--- a/test/mjsunit/es6/regexp-flags.js
+++ b/test/mjsunit/es6/regexp-flags.js
@@ -52,9 +52,10 @@ assertEquals(5, get_count);
function testName(name) {
- // TODO(littledan): For web compatibility, we don't throw an exception,
- // but ES2015 expects an exception to be thrown from this getter.
- assertEquals(undefined, RegExp.prototype[name]);
+ // Test for ES2017 RegExp web compatibility semantics
+ // https://github.com/tc39/ecma262/pull/511
+ assertEquals(name === "source" ? "(?:)" : undefined,
+ RegExp.prototype[name]);
assertEquals(
"get " + name,
Object.getOwnPropertyDescriptor(RegExp.prototype, name).get.name);
« no previous file with comments | « test/mjsunit/es6/regexp-constructor.js ('k') | test/mjsunit/es6/regexp-tostring.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698