| OLD | NEW |
| 1 Tests for .valueAsNumber with <input type=date>. | 1 Tests for .valueAsNumber with <input type=date>. |
| 2 | 2 |
| 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
| 4 | 4 |
| 5 | 5 |
| 6 PASS valueAsNumberFor("") is Number.NaN | 6 PASS valueAsNumberFor("") is Number.NaN |
| 7 PASS valueAsNumberFor("1969-12-31") is Date.UTC(1969, 11, 31) | 7 PASS valueAsNumberFor("1969-12-31") is Date.UTC(1969, 11, 31) |
| 8 PASS valueAsNumberFor("1970-01-01") is Date.UTC(1970, 0, 1) | 8 PASS valueAsNumberFor("1970-01-01") is Date.UTC(1970, 0, 1) |
| 9 PASS valueAsNumberFor("2009-12-22") is Date.UTC(2009, 11, 22) | 9 PASS valueAsNumberFor("2009-12-22") is Date.UTC(2009, 11, 22) |
| 10 PASS setValueAsNumberAndGetValue(1969, 11, 1) is "1969-12-01" | 10 PASS setValueAsNumberAndGetValue(1969, 11, 1) is "1969-12-01" |
| 11 PASS setValueAsNumberAndGetValue(1970, 0, 1) is "1970-01-01" | 11 PASS setValueAsNumberAndGetValue(1970, 0, 1) is "1970-01-01" |
| 12 PASS setValueAsNumberAndGetValue(2009, 11, 31) is "2009-12-31" | 12 PASS setValueAsNumberAndGetValue(2009, 11, 31) is "2009-12-31" |
| 13 PASS setValueAsNumberAndGetValue(10000, 0, 1) is "10000-01-01" | 13 PASS setValueAsNumberAndGetValue(10000, 0, 1) is "10000-01-01" |
| 14 PASS setValueAsNumberAndGetValue(-1, 0, 1) is "" | 14 PASS setValueAsNumberAndGetValue(-1, 0, 1) is "" |
| 15 PASS setValueAsNumberAndGetValue(0, 11, 31) is "" | 15 PASS setValueAsNumberAndGetValue(0, 11, 31) is "" |
| 16 PASS setValueAsNumberAndGetValue(1, 0, 1) is "0001-01-01" | 16 PASS setValueAsNumberAndGetValue(1, 0, 1) is "0001-01-01" |
| 17 PASS setValueAsNumberAndGetValue(275760, 8, 13) is "275760-09-13" | 17 PASS setValueAsNumberAndGetValue(275760, 8, 13) is "275760-09-13" |
| 18 Tests to set invalid values to valueAsNumber: | 18 Tests to set invalid values to valueAsNumber: |
| 19 PASS input.value = ""; input.valueAsNumber = null; input.value is "1970-01-01" | 19 PASS input.value = ""; input.valueAsNumber = null; input.value is "1970-01-01" |
| 20 PASS input.valueAsNumber = "foo" threw exception Error: NotSupportedError: DOM E
xception 9. | 20 PASS input.valueAsNumber = "foo" threw exception NotSupportedError: The implemen
tation did not support the requested type of object or operation.. |
| 21 PASS input.valueAsNumber = NaN threw exception Error: NotSupportedError: DOM Exc
eption 9. | 21 PASS input.valueAsNumber = NaN threw exception NotSupportedError: The implementa
tion did not support the requested type of object or operation.. |
| 22 PASS input.valueAsNumber = Number.NaN threw exception Error: NotSupportedError:
DOM Exception 9. | 22 PASS input.valueAsNumber = Number.NaN threw exception NotSupportedError: The imp
lementation did not support the requested type of object or operation.. |
| 23 PASS input.valueAsNumber = Infinity threw exception Error: NotSupportedError: DO
M Exception 9. | 23 PASS input.valueAsNumber = Infinity threw exception NotSupportedError: The imple
mentation did not support the requested type of object or operation.. |
| 24 PASS input.valueAsNumber = Number.POSITIVE_INFINITY threw exception Error: NotSu
pportedError: DOM Exception 9. | 24 PASS input.valueAsNumber = Number.POSITIVE_INFINITY threw exception NotSupported
Error: The implementation did not support the requested type of object or operat
ion.. |
| 25 PASS input.valueAsNumber = Number.NEGATIVE_INFINITY threw exception Error: NotSu
pportedError: DOM Exception 9. | 25 PASS input.valueAsNumber = Number.NEGATIVE_INFINITY threw exception NotSupported
Error: The implementation did not support the requested type of object or operat
ion.. |
| 26 PASS input.valueAsNumber = Date.UTC(275760, 8, 14) threw exception Error: NotSup
portedError: DOM Exception 9. | 26 PASS input.valueAsNumber = Date.UTC(275760, 8, 14) threw exception NotSupportedE
rror: The implementation did not support the requested type of object or operati
on.. |
| 27 PASS successfullyParsed is true | 27 PASS successfullyParsed is true |
| 28 | 28 |
| 29 TEST COMPLETE | 29 TEST COMPLETE |
| 30 | 30 |
| OLD | NEW |