| OLD | NEW |
| 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 var p = create(handler) | 343 var p = create(handler) |
| 344 assertEquals(42, p.a = 42) | 344 assertEquals(42, p.a = 42) |
| 345 assertEquals("a", key) | 345 assertEquals("a", key) |
| 346 assertEquals(42, val) | 346 assertEquals(42, val) |
| 347 assertEquals(43, p["b"] = 43) | 347 assertEquals(43, p["b"] = 43) |
| 348 assertEquals("b", key) | 348 assertEquals("b", key) |
| 349 assertEquals(43, val) | 349 assertEquals(43, val) |
| 350 assertEquals(44, p[77] = 44) | 350 assertEquals(44, p[77] = 44) |
| 351 assertEquals("77", key) | 351 assertEquals("77", key) |
| 352 assertEquals(44, val) | 352 assertEquals(44, val) |
| 353 |
| 354 assertEquals(45, (function(n) { return p[n] = 45 })("c")) |
| 355 assertEquals("c", key) |
| 356 assertEquals(45, val) |
| 357 assertEquals(46, (function(n) { return p[n] = 46 })(99)) |
| 358 assertEquals("99", key) |
| 359 assertEquals(46, val) |
| 353 } | 360 } |
| 354 | 361 |
| 355 TestSet({ | 362 TestSet({ |
| 356 set: function(r, k, v) { key = k; val = v; return true } | 363 set: function(r, k, v) { key = k; val = v; return true } |
| 357 }) | 364 }) |
| 358 | 365 |
| 359 TestSet({ | 366 TestSet({ |
| 360 set: function(r, k, v) { return this.set2(r, k, v) }, | 367 set: function(r, k, v) { return this.set2(r, k, v) }, |
| 361 set2: function(r, k, v) { key = k; val = v; return true } | 368 set2: function(r, k, v) { key = k; val = v; return true } |
| 362 }) | 369 }) |
| (...skipping 1794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2157 | 2164 |
| 2158 TestIsEnumerableThrow(Proxy.create({ | 2165 TestIsEnumerableThrow(Proxy.create({ |
| 2159 get: function(pr, pk) { throw "myexn" } | 2166 get: function(pr, pk) { throw "myexn" } |
| 2160 })) | 2167 })) |
| 2161 | 2168 |
| 2162 TestIsEnumerableThrow(Proxy.create({ | 2169 TestIsEnumerableThrow(Proxy.create({ |
| 2163 get: function(pr, pk) { | 2170 get: function(pr, pk) { |
| 2164 return function(k) { throw "myexn" } | 2171 return function(k) { throw "myexn" } |
| 2165 } | 2172 } |
| 2166 })) | 2173 })) |
| OLD | NEW |