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

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

Issue 1417063011: [runtime] support new Proxy() instead of Proxy.create and install getPrototypeOf trap (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: removing unreachable code 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 | « test/mjsunit/harmony/proxies-example-membrane.js ('k') | test/mjsunit/harmony/proxies-hash.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/proxies-for.js
diff --git a/test/mjsunit/harmony/proxies-for.js b/test/mjsunit/harmony/proxies-for.js
index e98c34afe58f3c509b9dd8a7c0800fb784138ac0..0b7bcc2cd099def71a503069a3a4b4a4b58b32f3 100644
--- a/test/mjsunit/harmony/proxies-for.js
+++ b/test/mjsunit/harmony/proxies-for.js
@@ -31,8 +31,10 @@
// Helper.
function TestWithProxies(test, x, y, z) {
- test(Proxy.create, x, y, z)
- test(function(h) {return Proxy.createFunction(h, function() {})}, x, y, z)
+ test(function(h){ return new Proxy({}, h) }, x, y, z)
+ test(function(h) {
+ return Proxy.createFunction(h, function() {})
+ }, x, y, z)
}
@@ -71,7 +73,7 @@ TestForIn(["b", "d"], {
}
})
-TestForIn(["b", "a", "0", "c"], Proxy.create({
+TestForIn(["b", "a", "0", "c"], new Proxy({}, {
get: function(pr, pk) {
return function() { return ["b", "a", 0, "c"] }
}
@@ -161,14 +163,14 @@ TestForInThrow({
getPropertyDescriptor: function() { throw "myexn" }
})
-TestForInThrow(Proxy.create({
+TestForInThrow(new Proxy({}, {
get: function(pr, pk) {
return function() { throw "myexn" }
}
}));
(function() {
- var p = Proxy.create({enumerate:function() { return [0]; }});
+ var p = new Proxy({}, {enumerate:function() { return [0]; }});
var o = [0];
o.__proto__ = p;
var keys = [];
@@ -177,7 +179,7 @@ TestForInThrow(Proxy.create({
})();
(function () {
- var p = Proxy.create({getOwnPropertyNames:
+ var p = new Proxy({}, {getOwnPropertyNames:
function() { return [1, Symbol(), 2] }});
assertEquals(["1","2"], Object.getOwnPropertyNames(p));
})();
« no previous file with comments | « test/mjsunit/harmony/proxies-example-membrane.js ('k') | test/mjsunit/harmony/proxies-hash.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698