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

Side by Side Diff: LayoutTests/fast/forms/date/input-valueasnumber-date-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=date>. 1 Tests for .valueAsNumber with <input type=date>.
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-31") is Date.UTC(1969, 11, 31) 7 PASS valueAsNumberFor("1969-12-31") is Date.UTC(1969, 11, 31)
8 PASS valueAsNumberFor("1970-01-01") is Date.UTC(1970, 0, 1) 8 PASS valueAsNumberFor("1970-01-01") is Date.UTC(1970, 0, 1)
9 PASS valueAsNumberFor("2009-12-22") is Date.UTC(2009, 11, 22) 9 PASS valueAsNumberFor("2009-12-22") is Date.UTC(2009, 11, 22)
10 PASS setValueAsNumberAndGetValue(1969, 11, 1) is "1969-12-01" 10 PASS setValueAsNumberAndGetValue(1969, 11, 1) is "1969-12-01"
11 PASS setValueAsNumberAndGetValue(1970, 0, 1) is "1970-01-01" 11 PASS setValueAsNumberAndGetValue(1970, 0, 1) is "1970-01-01"
12 PASS setValueAsNumberAndGetValue(2009, 11, 31) is "2009-12-31" 12 PASS setValueAsNumberAndGetValue(2009, 11, 31) is "2009-12-31"
13 PASS setValueAsNumberAndGetValue(10000, 0, 1) is "10000-01-01" 13 PASS setValueAsNumberAndGetValue(10000, 0, 1) is "10000-01-01"
14 PASS setValueAsNumberAndGetValue(-1, 0, 1) is "" 14 PASS setValueAsNumberAndGetValue(-1, 0, 1) is ""
15 PASS setValueAsNumberAndGetValue(0, 11, 31) is "" 15 PASS setValueAsNumberAndGetValue(0, 11, 31) is ""
16 PASS setValueAsNumberAndGetValue(1, 0, 1) is "0001-01-01" 16 PASS setValueAsNumberAndGetValue(1, 0, 1) is "0001-01-01"
17 PASS setValueAsNumberAndGetValue(275760, 8, 13) is "275760-09-13" 17 PASS setValueAsNumberAndGetValue(275760, 8, 13) is "275760-09-13"
18 Tests to set invalid values to valueAsNumber: 18 Tests to set invalid values to valueAsNumber:
19 PASS input.value = ""; input.valueAsNumber = null; input.value is "1970-01-01" 19 PASS input.value = ""; input.valueAsNumber = null; input.value is "1970-01-01"
20 PASS input.valueAsNumber = "foo" threw exception NotSupportedError: Failed to se t the 'valueAsNumber' property on 'HTMLInputElement': The value provided is not a number.. 20 PASS input.valueAsNumber = "foo"; input.valueAsNumber is NaN
21 PASS input.valueAsNumber = NaN threw exception NotSupportedError: Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The value provided is not a number.. 21 PASS input.valueAsNumber = "foo"; input.value is ""
22 PASS input.valueAsNumber = Number.NaN threw exception NotSupportedError: Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The value provided is not a number.. 22 PASS input.valueAsNumber = NaN; input.valueAsNumber is NaN
23 PASS input.valueAsNumber = Infinity threw exception NotSupportedError: Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The value provided is i nfinite.. 23 PASS input.valueAsNumber = NaN; input.value is ""
24 PASS input.valueAsNumber = Number.POSITIVE_INFINITY threw exception NotSupported Error: Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The val ue provided is infinite.. 24 PASS input.valueAsNumber = Number.NaN; input.valueAsNumber is NaN
25 PASS input.valueAsNumber = Number.NEGATIVE_INFINITY threw exception NotSupported Error: Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The val ue provided is infinite.. 25 PASS input.valueAsNumber = Number.NaN; input.value is ""
26 PASS input.valueAsNumber = Date.UTC(275760, 8, 14) threw exception NotSupportedE rror: Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The valu e provided is not a number.. 26 PASS input.valueAsNumber = Infinity threw exception TypeError: Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The value provided is infinite. .
27 PASS input.valueAsNumber = Number.POSITIVE_INFINITY threw exception TypeError: F ailed to set the 'valueAsNumber' property on 'HTMLInputElement': The value provi ded is infinite..
28 PASS input.valueAsNumber = Number.NEGATIVE_INFINITY threw exception TypeError: F ailed to set the 'valueAsNumber' property on 'HTMLInputElement': The value provi ded is infinite..
29 PASS input.valueAsNumber = Date.UTC(275760, 8, 14); input.valueAsNumber is NaN
30 PASS input.valueAsNumber = Date.UTC(275760, 8, 14); input.value is ""
27 PASS successfullyParsed is true 31 PASS successfullyParsed is true
28 32
29 TEST COMPLETE 33 TEST COMPLETE
30 34
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698