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

Side by Side Diff: test/mjsunit/harmony/proxies.js

Issue 8271005: Adapt to latest spec changes for Proxy.create[Function]. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 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 | Annotate | Revision Log
« src/proxy.js ('K') | « src/proxy.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 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after
1461 1461
1462 1462
1463 1463
1464 // Prototype (Object.getPrototypeOf, Object.prototype.isPrototypeOf). 1464 // Prototype (Object.getPrototypeOf, Object.prototype.isPrototypeOf).
1465 1465
1466 function TestPrototype() { 1466 function TestPrototype() {
1467 var o1 = {} 1467 var o1 = {}
1468 var p1 = Proxy.create({}) 1468 var p1 = Proxy.create({})
1469 var p2 = Proxy.create({}, o1) 1469 var p2 = Proxy.create({}, o1)
1470 var p3 = Proxy.create({}, p2) 1470 var p3 = Proxy.create({}, p2)
1471 var p4 = Proxy.create({}, 666) 1471 var p4 = Proxy.create({}, null)
1472 var o2 = Object.create(p3) 1472 var o2 = Object.create(p3)
1473 1473
1474 assertSame(Object.getPrototypeOf(o1), Object.prototype) 1474 assertSame(Object.getPrototypeOf(o1), Object.prototype)
1475 assertSame(Object.getPrototypeOf(p1), null) 1475 assertSame(Object.getPrototypeOf(p1), null)
1476 assertSame(Object.getPrototypeOf(p2), o1) 1476 assertSame(Object.getPrototypeOf(p2), o1)
1477 assertSame(Object.getPrototypeOf(p3), p2) 1477 assertSame(Object.getPrototypeOf(p3), p2)
1478 assertSame(Object.getPrototypeOf(p4), null) 1478 assertSame(Object.getPrototypeOf(p4), null)
1479 assertSame(Object.getPrototypeOf(o2), p3) 1479 assertSame(Object.getPrototypeOf(o2), p3)
1480 1480
1481 assertTrue(Object.prototype.isPrototypeOf(o1)) 1481 assertTrue(Object.prototype.isPrototypeOf(o1))
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
2157 2157
2158 TestIsEnumerableThrow(Proxy.create({ 2158 TestIsEnumerableThrow(Proxy.create({
2159 get: function(pr, pk) { throw "myexn" } 2159 get: function(pr, pk) { throw "myexn" }
2160 })) 2160 }))
2161 2161
2162 TestIsEnumerableThrow(Proxy.create({ 2162 TestIsEnumerableThrow(Proxy.create({
2163 get: function(pr, pk) { 2163 get: function(pr, pk) {
2164 return function(k) { throw "myexn" } 2164 return function(k) { throw "myexn" }
2165 } 2165 }
2166 })) 2166 }))
OLDNEW
« src/proxy.js ('K') | « src/proxy.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698