| 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..e92a0c37bc3de9eb3b4750b0474581319061304e 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];
|
| + assertThrows(function() {
|
| + Object.setPrototypeOf(object, value);
|
| + }, TypeError);
|
| + }
|
| +}
|
| +TestSetPrototypeCyclic();
|
| +
|
| +
|
| function TestLookup() {
|
| var object = {};
|
| assertFalse('x' in object);
|
|
|