| // Copyright (C) 2016 the V8 project authors. All rights reserved. |
| // This code is governed by the BSD license found in the LICENSE file. |
| description: Proxy of an array is treated as an array |
| 3. If argument is a Proxy exotic object, then |
| a. If the value of the [[ProxyHandler]] internal slot of argument is null, |
| throw a TypeError exception. |
| b. Let target be the value of the [[ProxyTarget]] internal slot of |
| c. Return ? IsArray(target). |
| var objectProxy = new Proxy({}, {}); |
| var arrayProxy = new Proxy([], {}); |
| var arrayProxyProxy = new Proxy(arrayProxy, {}); |
| assert.sameValue(Array.isArray(objectProxy), false); |
| assert.sameValue(Array.isArray(arrayProxy), true, 'proxy for array'); |
| Array.isArray(arrayProxyProxy), true, 'proxy for proxy for array' |