OLD | NEW |
1 Tests for .valueAsNumber with <input type=month>. | 1 Tests for .valueAsNumber with <input type=month>. |
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-01") is -12 | 7 PASS valueAsNumberFor("1969-01") is -12 |
8 PASS valueAsNumberFor("1969-12") is -1 | 8 PASS valueAsNumberFor("1969-12") is -1 |
9 PASS valueAsNumberFor("1970-01") is 0 | 9 PASS valueAsNumberFor("1970-01") is 0 |
10 PASS valueAsNumberFor("1970-12") is 11 | 10 PASS valueAsNumberFor("1970-12") is 11 |
11 PASS valueAsNumberFor("1971-01") is 12 | 11 PASS valueAsNumberFor("1971-01") is 12 |
12 PASS valueAsNumberFor("2009-12") is (2009-1970)*12+11 | 12 PASS valueAsNumberFor("2009-12") is (2009-1970)*12+11 |
13 PASS input.valueAsNumber = -1; input.value is "1969-12" | 13 PASS input.valueAsNumber = -1; input.value is "1969-12" |
14 PASS input.valueAsNumber = 0; input.value is "1970-01" | 14 PASS input.valueAsNumber = 0; input.value is "1970-01" |
15 PASS setValueAsNumberAndGetValue(2009, 12) is "2009-12" | 15 PASS setValueAsNumberAndGetValue(2009, 12) is "2009-12" |
16 PASS setValueAsNumberAndGetValue(10000, 1) is "10000-01" | 16 PASS setValueAsNumberAndGetValue(10000, 1) is "10000-01" |
17 PASS setValueAsNumberAndGetValue(-1, 1) is "" | 17 PASS setValueAsNumberAndGetValue(-1, 1) is "" |
18 PASS setValueAsNumberAndGetValue(0, 12) is "" | 18 PASS setValueAsNumberAndGetValue(0, 12) is "" |
19 PASS setValueAsNumberAndGetValue(1, 1) is "0001-01" | 19 PASS setValueAsNumberAndGetValue(1, 1) is "0001-01" |
20 PASS setValueAsNumberAndGetValue(1, 2) is "0001-02" | 20 PASS setValueAsNumberAndGetValue(1, 2) is "0001-02" |
21 PASS setValueAsNumberAndGetValue(275760, 9) is "275760-09" | 21 PASS setValueAsNumberAndGetValue(275760, 9) is "275760-09" |
22 PASS setValueAsNumberAndGetValue(275760, 10) is "" | 22 PASS setValueAsNumberAndGetValue(275760, 10) is "" |
23 Tests to set invalid values to valueAsNumber: | 23 Tests to set invalid values to valueAsNumber: |
24 PASS input.value = ""; input.valueAsNumber = null; input.value is "1970-01" | 24 PASS input.value = ""; input.valueAsNumber = null; input.value is "1970-01" |
25 PASS input.valueAsNumber = "foo" threw exception Error: NotSupportedError: DOM E
xception 9. | 25 PASS input.valueAsNumber = "foo" threw exception NotSupportedError: The implemen
tation did not support the requested type of object or operation.. |
26 PASS input.valueAsNumber = NaN threw exception Error: NotSupportedError: DOM Exc
eption 9. | 26 PASS input.valueAsNumber = NaN threw exception NotSupportedError: The implementa
tion did not support the requested type of object or operation.. |
27 PASS input.valueAsNumber = Number.NaN threw exception Error: NotSupportedError:
DOM Exception 9. | 27 PASS input.valueAsNumber = Number.NaN threw exception NotSupportedError: The imp
lementation did not support the requested type of object or operation.. |
28 PASS input.valueAsNumber = Infinity threw exception Error: NotSupportedError: DO
M Exception 9. | 28 PASS input.valueAsNumber = Infinity threw exception NotSupportedError: The imple
mentation did not support the requested type of object or operation.. |
29 PASS input.valueAsNumber = Number.POSITIVE_INFINITY threw exception Error: NotSu
pportedError: DOM Exception 9. | 29 PASS input.valueAsNumber = Number.POSITIVE_INFINITY threw exception NotSupported
Error: The implementation did not support the requested type of object or operat
ion.. |
30 PASS input.valueAsNumber = Number.NEGATIVE_INFINITY threw exception Error: NotSu
pportedError: DOM Exception 9. | 30 PASS input.valueAsNumber = Number.NEGATIVE_INFINITY threw exception NotSupported
Error: The implementation did not support the requested type of object or operat
ion.. |
31 PASS successfullyParsed is true | 31 PASS successfullyParsed is true |
32 | 32 |
33 TEST COMPLETE | 33 TEST COMPLETE |
34 | 34 |
OLD | NEW |