- add third_party src.
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / forms / week / input-valueasnumber-week-expected.txt
1 Tests for .valueAsNumber with <input type=week>.
2
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6 PASS valueAsNumberFor("") is Number.NaN
7 PASS valueAsNumberFor("2007-W01") is Date.UTC(2007, 0, 1)
8 PASS valueAsNumberFor("2008-W01") is Date.UTC(2007, 11, 31)
9 PASS valueAsNumberFor("2003-W01") is Date.UTC(2002, 11, 30)
10 PASS valueAsNumberFor("2004-W01") is Date.UTC(2003, 11, 29, 0, 0, 0, 0)
11 PASS valueAsNumberFor("2010-W01") is Date.UTC(2010, 0, 4)
12 PASS valueAsNumberFor("2005-W01") is Date.UTC(2005, 0, 3)
13 PASS valueAsNumberFor("2006-W01") is Date.UTC(2006, 0, 2)
14 Various January 1st:
15 PASS setValueAsNumberAndGetValue(2007, 0, 1) is "2007-W01"
16 PASS setValueAsNumberAndGetValue(2008, 0, 1) is "2008-W01"
17 PASS setValueAsNumberAndGetValue(2003, 0, 1) is "2003-W01"
18 PASS setValueAsNumberAndGetValue(2004, 0, 1) is "2004-W01"
19 PASS setValueAsNumberAndGetValue(2010, 0, 1) is "2009-W53"
20 PASS setValueAsNumberAndGetValue(2005, 0, 1) is "2004-W53"
21 PASS setValueAsNumberAndGetValue(2006, 0, 1) is "2005-W52"
22 Normal cases:
23 PASS setValueAsNumberAndGetValue(2010, 0, 3) is "2009-W53"
24 PASS setValueAsNumberAndGetValue(2010, 0, 4) is "2010-W01"
25 PASS setValueAsNumberAndGetValue(2010, 0, 10) is "2010-W01"
26 PASS setValueAsNumberAndGetValue(2010, 0, 11) is "2010-W02"
27 PASS setValueAsNumberAndGetValue(2010, 0, 17) is "2010-W02"
28 PASS setValueAsNumberAndGetValue(2010, 11, 31) is "2010-W52"
29 Around the minimum/maximum values:
30 PASS setValueAsNumberAndGetValue(0, 11, 31) is ""
31 PASS setValueAsNumberAndGetValue(1, 0, 1) is "0001-W01"
32 PASS setValueAsNumberAndGetValue(275760, 8, 8) is "275760-W37"
33 PASS setValueAsNumberAndGetValue(275760, 8, 13) is "275760-W37"
34 Tests to set invalid values to valueAsNumber:
35 PASS input.value = ""; input.valueAsNumber = null; input.value is "1970-W01"
36 PASS input.valueAsNumber = "foo" threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
37 PASS input.valueAsNumber = NaN threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
38 PASS input.valueAsNumber = Number.NaN threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
39 PASS input.valueAsNumber = Infinity threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
40 PASS input.valueAsNumber = Number.POSITIVE_INFINITY threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
41 PASS input.valueAsNumber = Number.NEGATIVE_INFINITY threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
42 PASS input.valueAsNumber = Date.UTC(275760, 8, 14) threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
43 PASS successfullyParsed is true
44
45 TEST COMPLETE
46