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

Unified Diff: test/mjsunit/harmony/proxies-json.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-hash.js ('k') | test/mjsunit/harmony/proxies-symbols.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/proxies-json.js
diff --git a/test/mjsunit/harmony/proxies-json.js b/test/mjsunit/harmony/proxies-json.js
index eba10a1453b80d5679eda5a7a33786e707d36d9b..43cb09f7a826d6ed950a8c642d12992b251bf199 100644
--- a/test/mjsunit/harmony/proxies-json.js
+++ b/test/mjsunit/harmony/proxies-json.js
@@ -47,7 +47,7 @@ var handler1 = {
}
}
-var proxy1 = Proxy.create(handler1);
+var proxy1 = new Proxy({}, handler1);
testStringify('{"a":"A","b":"B","c":"C"}', proxy1);
var proxy_fun = Proxy.createFunction(handler1, function() { return 1; });
@@ -77,7 +77,7 @@ var handler2 = {
}
}
-var proxy2 = Proxy.create(handler2);
+var proxy2 = new Proxy({}, handler2);
var parent2 = { a: "delete", b: proxy2, c: "remove" };
var expected2 = '{"a":"delete","b":{"a":"A","b":"B","c":"C"}}';
assertEquals(expected2, JSON.stringify(parent2));
@@ -98,7 +98,7 @@ var handler3 = {
}
}
-var proxy3 = Proxy.create(handler3);
+var proxy3 = new Proxy({}, handler3);
var parent3 = { x: 123, y: proxy3 }
testStringify('{"x":123,"y":{"a":"a(proxy)","b":"b(proxy)","c":"c(proxy)"}}',
parent3);
@@ -116,7 +116,7 @@ var handler4 = {
}
}
-var proxy4 = Proxy.create(handler4);
+var proxy4 = new Proxy({}, handler4);
testStringify('{}', proxy4);
testStringify('{"a":{}}', { a: proxy4 });
@@ -134,7 +134,7 @@ var handler5 = {
}
}
-var proxy5 = Proxy.create(handler5);
+var proxy5 = new Proxy({}, handler5);
testStringify('{"a":97097}', { a: proxy5 });
// Proxy that provides a toJSON function that returns undefined.
@@ -150,7 +150,7 @@ var handler6 = {
}
}
-var proxy6 = Proxy.create(handler6);
+var proxy6 = new Proxy({}, handler6);
testStringify('[1,null,true]', [1, proxy6, true]);
testStringify('{"a":1,"c":true}', {a: 1, b: proxy6, c: true});
@@ -170,7 +170,7 @@ var handler7 = {
}
}
-var proxy7 = Proxy.create(handler7);
+var proxy7 = new Proxy({}, handler7);
var parent7 = { a: "1", b: proxy7, c: "3", d: "4" };
assertEquals('{"a":"1","b":{"a":"A","b":"B","c":"C"},"d":"4"}',
JSON.stringify(parent7));
« no previous file with comments | « test/mjsunit/harmony/proxies-hash.js ('k') | test/mjsunit/harmony/proxies-symbols.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698