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

Unified Diff: test/mjsunit/object-create.js

Issue 2446203003: [builtins] Fix Object.create(null) special case (Closed)
Patch Set: addressing nits Created 4 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/code-stub-assembler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/object-create.js
diff --git a/test/mjsunit/object-create.js b/test/mjsunit/object-create.js
index d4f9e03c800d01403590244be6111f3ef601524d..d2f676e77cfa44309d239e34c22f9dd03bed7050 100644
--- a/test/mjsunit/object-create.js
+++ b/test/mjsunit/object-create.js
@@ -49,6 +49,27 @@ try {
assertTrue(/Object or null/.test(e));
}
+try {
+ Object.create(null, this);
+ assertTrue(false);
+} catch(e) {
+ assertTrue(/Property description/.test(e))
+}
+
+try {
+ Object.create(null, [1, 2, 3]);
+ assertTrue(false);
+} catch(e) {
+ assertTrue(/Property description/.test(e))
+}
+
+try {
+ Object.create(null, new Proxy([1, 2, 3], {}));
+ assertTrue(false);
+} catch(e) {
+ assertTrue(/Property description/.test(e))
+}
+
var ctr = 0;
var ctr2 = 0;
var ctr3 = 0;
« no previous file with comments | « src/code-stub-assembler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698