Chromium Code Reviews| Index: test/mjsunit/harmony/set-prototype-of.js |
| diff --git a/test/mjsunit/harmony/set-prototype-of.js b/test/mjsunit/harmony/set-prototype-of.js |
| index e06215a0edfcca65a84b4524f017c9805e856d22..c786f5420f93648475e367ac08bcddab064824c0 100644 |
| --- a/test/mjsunit/harmony/set-prototype-of.js |
| +++ b/test/mjsunit/harmony/set-prototype-of.js |
| @@ -139,6 +139,24 @@ function TestSetPrototypeOfNonExtensibleObject() { |
| TestSetPrototypeOfNonExtensibleObject(); |
| +function TestSetPrototypeCyclic() { |
| + var objects = [ |
| + Object.prototype, {}, |
| + Array.prototype, [], |
| + Error.prototype, new TypeError, |
| + // etc ... |
| + ]; |
| + for (var i = 0; i < objects.length; i += 2) { |
| + var object = objects[i]; |
| + var value = objects[i+1]; |
|
arv (Not doing code reviews)
2015/06/19 17:12:27
ws
|
| + assertThrows(function() { |
| + Object.setPrototypeOf(object, value); |
| + }, TypeError); |
| + } |
| +} |
| +TestSetPrototypeCyclic(); |
| + |
| + |
| function TestLookup() { |
| var object = {}; |
| assertFalse('x' in object); |