Chromium Code Reviews| Index: test/mjsunit/harmony/proxies.js |
| diff --git a/test/mjsunit/harmony/proxies.js b/test/mjsunit/harmony/proxies.js |
| index 69d1dea4bfbb953e68df5e58949456a799c312d1..f842dee904f1847540b29ca106ab75c7746fb228 100644 |
| --- a/test/mjsunit/harmony/proxies.js |
| +++ b/test/mjsunit/harmony/proxies.js |
| @@ -971,19 +971,19 @@ function TestHasOwn2(create, handler) { |
| } |
| TestHasOwn({ |
| - has(t, k) { key = k; return k < "z" } |
| + getOwnPropertyDescriptor(t, k) { |
| + key = k; if (k < "z") return {configurable: true} |
| + }, |
| + has() { throw "never called" } |
|
Jakob Kummerow
2015/12/17 11:43:48
nit: we also have assertUnreachable() (I don't car
|
| }) |
| TestHasOwn({ |
| - has(t, k) { return this.hasOwn2(k) }, |
| - hasOwn2(k) { key = k; return k < "z" } |
| + getOwnPropertyDescriptor(t, k) { return this.getOwnPropertyDescriptor2(k) }, |
| + getOwnPropertyDescriptor2(k) { |
| + key = k; if (k < "z") return {configurable: true} |
| + } |
| }) |
| -TestHasOwn(new Proxy({}, { |
| - get(pt, pk, pr) { |
| - return (t, k) => { key = k; return k < "z" } |
| - } |
| -})) |
| // --------------------------------------------------------------------------- |
| @@ -1000,24 +1000,13 @@ function TestHasOwnThrow2(create, handler) { |
| } |
| TestHasOwnThrow({ |
| - has(t, k) { throw "myexn" } |
| + getOwnPropertyDescriptor(t, k) { throw "myexn" } |
| }) |
| TestHasOwnThrow({ |
| - has(t, k) { return this.hasOwn2(k) }, |
| - hasOwn2(k) { throw "myexn" } |
| -}) |
| - |
| -TestHasOwnThrow(new Proxy({}, { |
| - get(pt, pk, pr) { throw "myexn" } |
| -})) |
| - |
| -TestHasOwnThrow(new Proxy({}, { |
| - get(pt, pk, pr) { |
| - return (t, k) => { throw "myexn" } |
| - } |
| -})); |
| - |
| + getOwnPropertyDescriptor(t, k) { return this.getOwnPropertyDescriptor2(k) }, |
| + getOwnPropertyDescriptor2(k) { throw "myexn" } |
| +}); |
| // --------------------------------------------------------------------------- |