Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1106)

Side by Side Diff: LayoutTests/fast/forms/month/input-valueasnumber-month-expected.txt

Issue 149413004: HTMLInputElement.valueAsNumber compliance (NaN handling.) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 NotSupportedError: Failed to se t the 'valueAsNumber' property on 'HTMLInputElement': The value provided is not a number.. 25 PASS input.valueAsNumber = "foo"; input.valueAsNumber is NaN
26 PASS input.valueAsNumber = NaN threw exception NotSupportedError: Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The value provided is not a number.. 26 PASS input.valueAsNumber = "foo"; input.value is ""
27 PASS input.valueAsNumber = Number.NaN threw exception NotSupportedError: Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The value provided is not a number.. 27 PASS input.valueAsNumber = NaN; input.valueAsNumber is NaN
28 PASS input.valueAsNumber = Infinity threw exception NotSupportedError: Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The value provided is i nfinite.. 28 PASS input.valueAsNumber = NaN; input.value is ""
29 PASS input.valueAsNumber = Number.POSITIVE_INFINITY threw exception NotSupported Error: Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The val ue provided is infinite.. 29 PASS input.valueAsNumber = Number.NaN; input.valueAsNumber is NaN
30 PASS input.valueAsNumber = Number.NEGATIVE_INFINITY threw exception NotSupported Error: Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The val ue provided is infinite.. 30 PASS input.valueAsNumber = Number.NaN; input.value is ""
31 PASS input.valueAsNumber = Infinity threw exception TypeError: Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The value provided is infinite. .
32 PASS input.valueAsNumber = Number.POSITIVE_INFINITY threw exception TypeError: F ailed to set the 'valueAsNumber' property on 'HTMLInputElement': The value provi ded is infinite..
33 PASS input.valueAsNumber = Number.NEGATIVE_INFINITY threw exception TypeError: F ailed to set the 'valueAsNumber' property on 'HTMLInputElement': The value provi ded is infinite..
31 PASS successfullyParsed is true 34 PASS successfullyParsed is true
32 35
33 TEST COMPLETE 36 TEST COMPLETE
34 37
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698