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

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

Issue 1516843002: [proxy] fixing harmony/proxy.js tests and improving error messages + some drive-by fixes (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: WIP fix protoype walks with access checks Created 5 years 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
Index: test/mjsunit/harmony/proxies-for.js
diff --git a/test/mjsunit/harmony/proxies-for.js b/test/mjsunit/harmony/proxies-for.js
index eaf15e1d0167075b74cdc34a99e2300ad32f253e..dd37a3bd6b23f8a1cfe72fcbcd4fb31a7fc2e5b9 100644
--- a/test/mjsunit/harmony/proxies-for.js
+++ b/test/mjsunit/harmony/proxies-for.js
@@ -32,10 +32,9 @@
function TestWithProxies(test, x, y, z) {
test(function(h){ return new Proxy({}, h) }, x, y, z)
- // TODO(cbruni): enable once we have [[Call]] working.
- // test(function(h) {
- // return Proxy.createFunction(h, function() {})
- // }, x, y, z)
+ test(function(h) {
+ return new Proxy(function() {}, h)
+ }, x, y, z)
}
@@ -55,12 +54,14 @@ function TestForIn2(create, properties, handler) {
}
TestForIn(["0", "a"], {
- enumerate: function() { return ["0", "a"].values() }
+ enumerate() { return ["0", "a"].values() },
+ has(target, property) { return true }
})
TestForIn(["null", "a"], {
- enumerate: function() { return this.enumerate2() },
- enumerate2: function() { return ["null", "a"].values() }
+ enumerate() { return this.enumerate2() },
+ enumerate2() { return ["null", "a"].values() },
+ has(target, property) { return true }
})
TestForIn(["b", "a", "0", "c"], new Proxy({}, {

Powered by Google App Engine
This is Rietveld 408576698