blob: 2e82b99def25ae2c1fbf24e5fc1ef81f497cdae2 [file] [log] [blame]
Tests that using defineProperty() does not clear existing setter if the new descriptor only has a getter
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
Override only the getter
Object.defineProperty(HTMLInputElement.prototype, "value", { get: newGetter })
newDescriptor = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")
PASS newDescriptor.get is newGetter
PASS newDescriptor.set is oldDescriptor.set
PASS newDescriptor.enumerable is true
PASS newDescriptor.configurable is true
PASS successfullyParsed is true
TEST COMPLETE