OLD | NEW |
1 Tests for .valueAsNumber with <input type=datetime-local>. | 1 Tests for .valueAsNumber with <input type=datetime-local>. |
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-31T12:34:56.789") is Date.UTC(1969, 11, 31, 12, 3
4, 56, 789) | 7 PASS valueAsNumberFor("1969-12-31T12:34:56.789") is Date.UTC(1969, 11, 31, 12, 3
4, 56, 789) |
8 PASS valueAsNumberFor("1970-01-01T00:00:00.000") is Date.UTC(1970, 0, 1, 0, 0, 0
) | 8 PASS valueAsNumberFor("1970-01-01T00:00:00.000") is Date.UTC(1970, 0, 1, 0, 0, 0
) |
9 PASS valueAsNumberFor("2009-12-22T11:32:11") is Date.UTC(2009, 11, 22, 11, 32, 1
1) | 9 PASS valueAsNumberFor("2009-12-22T11:32:11") is Date.UTC(2009, 11, 22, 11, 32, 1
1) |
10 PASS setValueAsNumberAndGetValue(1969, 11, 1, 0, 0, 0, 0) is "1969-12-01T00:00" | 10 PASS setValueAsNumberAndGetValue(1969, 11, 1, 0, 0, 0, 0) is "1969-12-01T00:00" |
11 PASS setValueAsNumberAndGetValue(1970, 0, 1, 10, 1, 0, 100) is "1970-01-01T10:01
:00.100" | 11 PASS setValueAsNumberAndGetValue(1970, 0, 1, 10, 1, 0, 100) is "1970-01-01T10:01
:00.100" |
12 PASS setValueAsNumberAndGetValue(2009, 11, 31, 23, 59, 59, 999) is "2009-12-31T2
3:59:59.999" | 12 PASS setValueAsNumberAndGetValue(2009, 11, 31, 23, 59, 59, 999) is "2009-12-31T2
3:59:59.999" |
13 PASS setValueAsNumberAndGetValue(10000, 0, 1, 12, 0, 1, 0) is "10000-01-01T12:00
:01" | 13 PASS setValueAsNumberAndGetValue(10000, 0, 1, 12, 0, 1, 0) is "10000-01-01T12:00
:01" |
14 PASS setValueAsNumberAndGetValue(-1, 0, 1, 0, 0, 0, 0) is "" | 14 PASS setValueAsNumberAndGetValue(-1, 0, 1, 0, 0, 0, 0) is "" |
15 PASS setValueAsNumberAndGetValue(0, 11, 31, 23, 59, 59, 999) is "" | 15 PASS setValueAsNumberAndGetValue(0, 11, 31, 23, 59, 59, 999) is "" |
16 PASS setValueAsNumberAndGetValue(1, 0, 1, 0, 0, 0, 0) is "0001-01-01T00:00" | 16 PASS setValueAsNumberAndGetValue(1, 0, 1, 0, 0, 0, 0) is "0001-01-01T00:00" |
17 PASS setValueAsNumberAndGetValue(275760, 8, 12, 0, 0, 0, 1) is "275760-09-12T00:
00:00.001" | 17 PASS setValueAsNumberAndGetValue(275760, 8, 12, 0, 0, 0, 1) is "275760-09-12T00:
00:00.001" |
18 PASS setValueAsNumberAndGetValue(275760, 8, 13, 0, 0, 0, 0) is "275760-09-13T00:
00" | 18 PASS setValueAsNumberAndGetValue(275760, 8, 13, 0, 0, 0, 0) is "275760-09-13T00:
00" |
19 Tests to set invalid values to valueAsNumber: | 19 Tests to set invalid values to valueAsNumber: |
20 PASS input.value = ""; input.valueAsNumber = null; input.value is "1970-01-01T00
:00" | 20 PASS input.value = ""; input.valueAsNumber = null; input.value is "1970-01-01T00
:00" |
21 PASS input.valueAsNumber = "foo" threw exception Error: NotSupportedError: DOM E
xception 9. | 21 PASS input.valueAsNumber = "foo" threw exception NotSupportedError: The implemen
tation did not support the requested type of object or operation.. |
22 PASS input.valueAsNumber = NaN threw exception Error: NotSupportedError: DOM Exc
eption 9. | 22 PASS input.valueAsNumber = NaN threw exception NotSupportedError: The implementa
tion did not support the requested type of object or operation.. |
23 PASS input.valueAsNumber = Number.NaN threw exception Error: NotSupportedError:
DOM Exception 9. | 23 PASS input.valueAsNumber = Number.NaN threw exception NotSupportedError: The imp
lementation did not support the requested type of object or operation.. |
24 PASS input.valueAsNumber = Infinity threw exception Error: NotSupportedError: DO
M Exception 9. | 24 PASS input.valueAsNumber = Infinity threw exception NotSupportedError: The imple
mentation did not support the requested type of object or operation.. |
25 PASS input.valueAsNumber = Number.POSITIVE_INFINITY threw exception Error: NotSu
pportedError: DOM Exception 9. | 25 PASS input.valueAsNumber = Number.POSITIVE_INFINITY threw exception NotSupported
Error: The implementation did not support the requested type of object or operat
ion.. |
26 PASS input.valueAsNumber = Number.NEGATIVE_INFINITY threw exception Error: NotSu
pportedError: DOM Exception 9. | 26 PASS input.valueAsNumber = Number.NEGATIVE_INFINITY threw exception NotSupported
Error: The implementation did not support the requested type of object or operat
ion.. |
27 PASS input.valueAsNumber = Date.UTC(275760, 8, 13, 0, 0, 0, 1) threw exception E
rror: NotSupportedError: DOM Exception 9. | 27 PASS input.valueAsNumber = Date.UTC(275760, 8, 13, 0, 0, 0, 1) threw exception N
otSupportedError: The implementation did not support the requested type of objec
t or operation.. |
28 Step attribute value and string representation: | 28 Step attribute value and string representation: |
29 PASS input.step = "1"; setValueAsNumberAndGetValue(2010, 0, 21, 0, 0, 0, 0) is "
2010-01-21T00:00:00" | 29 PASS input.step = "1"; setValueAsNumberAndGetValue(2010, 0, 21, 0, 0, 0, 0) is "
2010-01-21T00:00:00" |
30 PASS input.step = "0.001"; setValueAsNumberAndGetValue(2010, 0, 21, 0, 0, 0, 0)
is "2010-01-21T00:00:00.000" | 30 PASS input.step = "0.001"; setValueAsNumberAndGetValue(2010, 0, 21, 0, 0, 0, 0)
is "2010-01-21T00:00:00.000" |
31 PASS successfullyParsed is true | 31 PASS successfullyParsed is true |
32 | 32 |
33 TEST COMPLETE | 33 TEST COMPLETE |
34 | 34 |
OLD | NEW |