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); |