| Tests that using defineProperty() on a custom accessor |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| oldDescriptor = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value") |
| PASS oldDescriptor.get is an instance of Function |
| PASS oldDescriptor.set is an instance of Function |
| PASS oldDescriptor.enumerable is true |
| PASS oldDescriptor.configurable is true |
| |
| Object.defineProperty(HTMLInputElement.prototype, "value", { get: newGetter, set: newSetter, enumerable: false, configurable: false }) |
| |
| newDescriptor = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value") |
| PASS newDescriptor.get is newGetter |
| PASS newDescriptor.set is newSetter |
| PASS newDescriptor.enumerable is false |
| PASS newDescriptor.configurable is false |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |