| Index: test/mjsunit/es6/regexp-flags.js
|
| diff --git a/test/mjsunit/es6/regexp-flags.js b/test/mjsunit/es6/regexp-flags.js
|
| index 79b0197e917630c35481dd9f5256da7db484a932..33d103618fd1453e9502e627f48a0941b4ffdbb8 100644
|
| --- a/test/mjsunit/es6/regexp-flags.js
|
| +++ b/test/mjsunit/es6/regexp-flags.js
|
| @@ -52,7 +52,11 @@ assertEquals(4, 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]);
|
| + if (name === "source") {
|
| + assertThrows(() => RegExp.prototype[name], TypeError);
|
| + } else {
|
| + assertEquals(undefined, RegExp.prototype[name]);
|
| + }
|
| assertEquals(
|
| "get " + name,
|
| Object.getOwnPropertyDescriptor(RegExp.prototype, name).get.name);
|
|
|