summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/input-valueasnumber-week-expected.txt
blob: 77afbfe316055c6091317865fc2dfed984ac7c6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Tests for .valueAsNumber with <input type=week>.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS valueAsNumberFor("") is Number.NaN
PASS valueAsNumberFor("2007-W01") is Date.UTC(2007, 0, 1)
PASS valueAsNumberFor("2008-W01") is Date.UTC(2007, 11, 31)
PASS valueAsNumberFor("2003-W01") is Date.UTC(2002, 11, 30)
PASS valueAsNumberFor("2004-W01") is Date.UTC(2003, 11, 29, 0, 0, 0, 0)
PASS valueAsNumberFor("2010-W01") is Date.UTC(2010, 0, 4)
PASS valueAsNumberFor("2005-W01") is Date.UTC(2005, 0, 3)
PASS valueAsNumberFor("2006-W01") is Date.UTC(2006, 0, 2)
Various January 1st:
PASS setValueAsNumberAndGetValue(2007, 0, 1) is "2007-W01"
PASS setValueAsNumberAndGetValue(2008, 0, 1) is "2008-W01"
PASS setValueAsNumberAndGetValue(2003, 0, 1) is "2003-W01"
PASS setValueAsNumberAndGetValue(2004, 0, 1) is "2004-W01"
PASS setValueAsNumberAndGetValue(2010, 0, 1) is "2009-W53"
PASS setValueAsNumberAndGetValue(2005, 0, 1) is "2004-W53"
PASS setValueAsNumberAndGetValue(2006, 0, 1) is "2005-W52"
Normal cases:
PASS setValueAsNumberAndGetValue(2010, 0, 3) is "2009-W53"
PASS setValueAsNumberAndGetValue(2010, 0, 4) is "2010-W01"
PASS setValueAsNumberAndGetValue(2010, 0, 10) is "2010-W01"
PASS setValueAsNumberAndGetValue(2010, 0, 11) is "2010-W02"
PASS setValueAsNumberAndGetValue(2010, 0, 17) is "2010-W02"
PASS setValueAsNumberAndGetValue(2010, 11, 31) is "2010-W52"
Around the minimum/maximum values:
PASS setValueAsNumberAndGetValue(0, 11, 31) is ""
PASS setValueAsNumberAndGetValue(1, 0, 1) is "0001-W01"
PASS setValueAsNumberAndGetValue(275760, 8, 8) is "275760-W37"
PASS setValueAsNumberAndGetValue(275760, 8, 13) is "275760-W37"
Tests to set invalid values to valueAsNumber:
PASS input.value = ""; input.valueAsNumber = null; input.value is "1970-W01"
PASS input.valueAsNumber = "foo" threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
PASS input.valueAsNumber = NaN threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
PASS input.valueAsNumber = Number.NaN threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
PASS input.valueAsNumber = Infinity threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
PASS input.valueAsNumber = Number.POSITIVE_INFINITY threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
PASS input.valueAsNumber = Number.NEGATIVE_INFINITY threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
PASS input.valueAsNumber = Date.UTC(275760, 8, 14) threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
PASS successfullyParsed is true

TEST COMPLETE