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

Unified Diff: test/mjsunit/harmony/proxies-enumerate.js

Issue 1479143002: [proxies] [[HasProperty]]: fix trap call. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased Created 5 years, 1 month 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/objects.cc ('k') | test/mjsunit/harmony/proxies-has.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/proxies-enumerate.js
diff --git a/test/mjsunit/harmony/proxies-enumerate.js b/test/mjsunit/harmony/proxies-enumerate.js
index 32d6bb5873283500ec98ac6ec2e769601fa33a3f..87eb554fcb115542c543486c8a93c5c497ebffeb 100644
--- a/test/mjsunit/harmony/proxies-enumerate.js
+++ b/test/mjsunit/harmony/proxies-enumerate.js
@@ -17,6 +17,11 @@ var handler = {
yield "bar";
}
return keys();
+ },
+ // For-in calls "has" on every iteration, so for TestForIn() below to
+ // detect all results of the "enumerate" trap, "has" must return true.
+ has: function(target, name) {
+ return true;
}
}
@@ -37,8 +42,7 @@ var receiver = {
"receiver_one": 1
};
receiver.__proto__ = proxy;
-// TODO(jkummerow): Needs proper 'has' trap; implement that and enable this!
-// TestForIn(receiver, ["receiver_one", "foo", "bar"]);
+TestForIn(receiver, ["receiver_one", "foo", "bar"]);
// Fall through to default behavior when trap is undefined.
handler.enumerate = undefined;
« no previous file with comments | « src/objects.cc ('k') | test/mjsunit/harmony/proxies-has.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698