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

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

Issue 1423993006: RegExp.prototype is an ordinary object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 2 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/messages.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/regexp-prototype.js
diff --git a/test/mjsunit/es6/regexp-prototype.js b/test/mjsunit/es6/regexp-prototype.js
new file mode 100644
index 0000000000000000000000000000000000000000..673be4b97e88e0b195b0cca53652998ef280996d
--- /dev/null
+++ b/test/mjsunit/es6/regexp-prototype.js
@@ -0,0 +1,17 @@
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// ES6 21.2.4.1
+var proto_desc = Object.getOwnPropertyDescriptor(RegExp, "prototype");
+assertFalse(proto_desc.writable);
+assertFalse(proto_desc.enumerable);
+assertFalse(proto_desc.configurable);
+
+// ES6 21.2.5.1
+var proto = proto_desc.value;
+assertFalse(proto instanceof RegExp);
+assertEquals(undefined, Object.getOwnPropertyDescriptor(proto, "valueOf"));
+assertEquals(proto.valueOf, Object.prototype.valueOf);
+var proto_constr = Object.getOwnPropertyDescriptor(proto, "constructor");
+assertEquals(RegExp, proto_constr.value);
« no previous file with comments | « src/js/regexp.js ('k') | test/mjsunit/messages.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698