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

Unified Diff: test/mjsunit/harmony/object-literals-method.js

Issue 858673002: Fix issue with __proto__ when using ES6 object literals (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: git rebase Created 5 years, 11 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/preparser.h ('k') | test/mjsunit/harmony/object-literals-property-shorthand.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/object-literals-method.js
diff --git a/test/mjsunit/harmony/object-literals-method.js b/test/mjsunit/harmony/object-literals-method.js
index 71f44d10bc7ea65679699b904a1e1c02cd6a6ddc..605e269fcb08f4f72d08e732200c2192a1ca508f 100644
--- a/test/mjsunit/harmony/object-literals-method.js
+++ b/test/mjsunit/harmony/object-literals-method.js
@@ -246,3 +246,27 @@ function assertIteratorResult(value, done, result) {
};
assertEquals('*method() { yield 1; }', object.method.toString());
})();
+
+
+(function TestProtoName() {
+ var object = {
+ __proto__() {
+ return 1;
+ }
+ };
+ assertEquals(Object.prototype, Object.getPrototypeOf(object));
+ assertEquals(1, object.__proto__());
+})();
+
+
+(function TestProtoName2() {
+ var p = {};
+ var object = {
+ __proto__() {
+ return 1;
+ },
+ __proto__: p
+ };
+ assertEquals(p, Object.getPrototypeOf(object));
+ assertEquals(1, object.__proto__());
+})();
« no previous file with comments | « src/preparser.h ('k') | test/mjsunit/harmony/object-literals-property-shorthand.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698