| Test prototypes of various objects and the various means to access them. |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| PASS ('').__proto__ is String.prototype |
| PASS (0).__proto__ is Number.prototype |
| PASS (true).__proto__ is Boolean.prototype |
| PASS (Symbol()).__proto__ is Symbol.prototype |
| PASS ([]).__proto__ is Array.prototype |
| PASS ({}).__proto__ is Object.prototype |
| PASS (new Date).__proto__ is Date.prototype |
| PASS (new Error).__proto__ is Error.prototype |
| PASS (new Number).__proto__ is Number.prototype |
| PASS (new Object).__proto__ is Object.prototype |
| PASS (new String).__proto__ is String.prototype |
| PASS Array.prototype.__proto__ is Object.prototype |
| PASS Date.prototype.__proto__ is Object.prototype |
| PASS Number.prototype.__proto__ is Object.prototype |
| PASS Object.prototype.__proto__ is null |
| PASS String.prototype.__proto__ is Object.prototype |
| PASS Array.__proto__ is Object.__proto__ |
| PASS Date.__proto__ is Object.__proto__ |
| PASS Number.__proto__ is Object.__proto__ |
| PASS String.__proto__ is Object.__proto__ |
| PASS Object.getPrototypeOf('') is String.prototype |
| PASS Object.getPrototypeOf(0) is Number.prototype |
| PASS Object.getPrototypeOf(true) is Boolean.prototype |
| PASS Object.getPrototypeOf(Symbol()) is Symbol.prototype |
| PASS Object.getPrototypeOf([]) is Array.prototype |
| PASS Object.getPrototypeOf({}) is Object.prototype |
| PASS Object.getPrototypeOf(new Date) is Date.prototype |
| PASS Object.getPrototypeOf(new Error) is Error.prototype |
| PASS Object.getPrototypeOf(new Number) is Number.prototype |
| PASS Object.getPrototypeOf(new Object) is Object.prototype |
| PASS Object.getPrototypeOf(new String) is String.prototype |
| PASS Object.getPrototypeOf(Array.prototype) is Object.prototype |
| PASS Object.getPrototypeOf(Date.prototype) is Object.prototype |
| PASS Object.getPrototypeOf(Number.prototype) is Object.prototype |
| PASS Object.getPrototypeOf(Object.prototype) is null |
| PASS Object.getPrototypeOf(String.prototype) is Object.prototype |
| PASS Object.getPrototypeOf(Array) is Object.__proto__ |
| PASS Object.getPrototypeOf(Date) is Object.__proto__ |
| PASS Object.getPrototypeOf(Number) is Object.__proto__ |
| PASS Object.getPrototypeOf(String) is Object.__proto__ |
| PASS String.prototype.isPrototypeOf('') is false |
| PASS Number.prototype.isPrototypeOf(0) is false |
| PASS Boolean.prototype.isPrototypeOf(true) is false |
| PASS Symbol.prototype.isPrototypeOf(Symbol()) is false |
| PASS Array.prototype.isPrototypeOf([]) is true |
| PASS Object.prototype.isPrototypeOf({}) is true |
| PASS Date.prototype.isPrototypeOf(new Date) is true |
| PASS Error.prototype.isPrototypeOf(new Error) is true |
| PASS Number.prototype.isPrototypeOf(new Number) is true |
| PASS Object.prototype.isPrototypeOf(new Object) is true |
| PASS String.prototype.isPrototypeOf(new String) is true |
| PASS Object.prototype.isPrototypeOf(Array.prototype) is true |
| PASS Object.prototype.isPrototypeOf(Date.prototype) is true |
| PASS Object.prototype.isPrototypeOf(Number.prototype) is true |
| PASS Object.prototype.isPrototypeOf(String.prototype) is true |
| PASS Object.__proto__.isPrototypeOf(Array) is true |
| PASS Object.__proto__.isPrototypeOf(Date) is true |
| PASS Object.__proto__.isPrototypeOf(Number) is true |
| PASS Object.__proto__.isPrototypeOf(String) is true |
| PASS var wasSet = false; var o = { }; o.__defineGetter__("__proto__", function() { wasSet = true }); o.__proto__; wasSet; is true |
| PASS var wasSet = false; var o = { }; o.__defineSetter__("__proto__", function() { wasSet = true }); o.__proto__ = {}; wasSet; is true |
| PASS var wasSet = false; var o = { }; Object.defineProperty(o, "__proto__", { "get": function() { wasSet = true } }); o.__proto__; wasSet; is true |
| PASS var wasSet = false; var o = { }; Object.defineProperty(o, "__proto__", { "__proto__": function(x) { wasSet = true } }); o.__proto__ = {}; wasSet; is false |
| PASS var o = {}; o.__proto__ = { x:true }; o.x is true |
| PASS var o = {}; o.__proto__ = { x:true }; o.hasOwnProperty('__proto__') is false |
| PASS var o = {}; o.__proto__ = { x:true }; o.x is undefined. |
| PASS var o = {}; o.__proto__ = { x:true }; o.hasOwnProperty('__proto__') is true |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |