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

Side by Side Diff: test/mjsunit/es6/proxies-for.js

Issue 2085273002: Gender neutral comments. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « test/mjsunit/debug-handle.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 assertEquals([], keys(o)); 144 assertEquals([], keys(o));
145 })(); 145 })();
146 146
147 (function testKeysProxyOnProto() { 147 (function testKeysProxyOnProto() {
148 var handler = {ownKeys() { return ["0"]; }}; 148 var handler = {ownKeys() { return ["0"]; }};
149 var proxy = new Proxy({}, handler); 149 var proxy = new Proxy({}, handler);
150 var object = [0]; 150 var object = [0];
151 object.__proto__ = proxy; 151 object.__proto__ = proxy;
152 assertEquals(["0"], keys(object)); 152 assertEquals(["0"], keys(object));
153 153
154 // The Proxy doesn't set his ownKeys enumerable. 154 // The Proxy doesn't set its ownKeys enumerable.
155 delete object[0]; 155 delete object[0];
156 assertEquals([], keys(object)); 156 assertEquals([], keys(object));
157 157
158 // The [[Has]] trap has no influence on which are enumerable properties are 158 // The [[Has]] trap has no influence on which are enumerable properties are
159 // shown in for-in. 159 // shown in for-in.
160 handler.has = function() { return true }; 160 handler.has = function() { return true };
161 assertEquals([], keys(object)); 161 assertEquals([], keys(object));
162 162
163 handler.getOwnPropertyDescriptor = function() { 163 handler.getOwnPropertyDescriptor = function() {
164 return {enumerable: true, configurable: true} 164 return {enumerable: true, configurable: true}
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 ownKeys() { 214 ownKeys() {
215 return ['c']; 215 return ['c'];
216 }, 216 },
217 getOwnPropertyDescriptor() { return {configurable: true, enumerable: true } } 217 getOwnPropertyDescriptor() { return {configurable: true, enumerable: true } }
218 } 218 }
219 var proxy = new Proxy({}, handler); 219 var proxy = new Proxy({}, handler);
220 var proxy2 = new Proxy(proxy, {}); 220 var proxy2 = new Proxy(proxy, {});
221 assertEquals(['c'], keys(proxy)); 221 assertEquals(['c'], keys(proxy));
222 assertEquals(['c'], keys(proxy2)); 222 assertEquals(['c'], keys(proxy2));
223 })(); 223 })();
OLDNEW
« no previous file with comments | « test/mjsunit/debug-handle.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698