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

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

Issue 1963633002: [keys] fixing nested JSProxy for-in enumeration (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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/keys.cc ('k') | test/mjsunit/es6/proxies-keys.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/proxies-for.js
diff --git a/test/mjsunit/es6/proxies-for.js b/test/mjsunit/es6/proxies-for.js
index 5b818453a9ce1726b7f685dc6159a393b007870b..a171227873228e2e81985c003bb30a0d81405e23 100644
--- a/test/mjsunit/es6/proxies-for.js
+++ b/test/mjsunit/es6/proxies-for.js
@@ -209,10 +209,15 @@ function keys(object) {
assertThrowsEquals(() => {keys(proxy)}, "error");
})();
-
-(function () {
- var symbol = Symbol();
- var p = new Proxy({}, {ownKeys() { return ["1", symbol, "2"] }});
- assertEquals(["1","2"], Object.getOwnPropertyNames(p));
- assertEquals([symbol], Object.getOwnPropertySymbols(p));
+(function testNestedProxy() {
+ var handler = {
+ ownKeys() {
+ return ['c'];
+ },
+ getOwnPropertyDescriptor() { return {configurable: true, enumerable: true } }
+ }
+ var proxy = new Proxy({}, handler);
+ var proxy2 = new Proxy(proxy, {});
+ assertEquals(['c'], keys(proxy));
+ assertEquals(['c'], keys(proxy2));
})();
« no previous file with comments | « src/keys.cc ('k') | test/mjsunit/es6/proxies-keys.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698