blob: cc20add41fd5b577b429d7951bc90f05762b872a [file] [log] [blame]
Test HTMLInputElement::valueAsDate binding.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Unsuppported type:
PASS input.valueAsDate is null
PASS input.valueAsDate = date threw exception InvalidStateError: Failed to set the 'valueAsDate' property on 'HTMLInputElement': This input element does not support Date values..
Supported type:
PASS valueAsDate != null is true
PASS typeof valueAsDate is "object"
PASS valueAsDate.constructor.name is "Date"
Sets an Epoch Date:
PASS input.value is "1970-01"
PASS input.valueAsDate.getTime() is 0
Sets a number 0:
PASS input.valueAsDate = 0 threw exception TypeError: Failed to set the 'valueAsDate' property on 'HTMLInputElement': Failed to convert value to 'object'..
Sets other types:
PASS input.value is ""
PASS input.value is ""
PASS input.valueAsDate = document threw exception TypeError: Failed to set the 'valueAsDate' property on 'HTMLInputElement': The provided value is not a Date..
PASS successfullyParsed is true
TEST COMPLETE