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

Side by Side Diff: LayoutTests/fast/forms/time/time-valueasnumber-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=time>. 1 Tests for .valueAsNumber with <input type=time>.
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("00:00:00.000") is Date.UTC(1970, 0, 1, 0, 0, 0, 0) 7 PASS valueAsNumberFor("00:00:00.000") is Date.UTC(1970, 0, 1, 0, 0, 0, 0)
8 PASS valueAsNumberFor("04:35") is Date.UTC(1970, 0, 1, 4, 35, 0, 0) 8 PASS valueAsNumberFor("04:35") is Date.UTC(1970, 0, 1, 4, 35, 0, 0)
9 PASS valueAsNumberFor("23:59:59.999") is Date.UTC(1970, 0, 1, 23, 59, 59, 999) 9 PASS valueAsNumberFor("23:59:59.999") is Date.UTC(1970, 0, 1, 23, 59, 59, 999)
10 PASS setValueAsNumberAndGetValue(0, 0, 0, 0) is "00:00" 10 PASS setValueAsNumberAndGetValue(0, 0, 0, 0) is "00:00"
11 PASS setValueAsNumberAndGetValue(0, 0, 1, 0) is "00:00:01" 11 PASS setValueAsNumberAndGetValue(0, 0, 1, 0) is "00:00:01"
12 PASS setValueAsNumberAndGetValue(0, 0, 0, 2) is "00:00:00.002" 12 PASS setValueAsNumberAndGetValue(0, 0, 0, 2) is "00:00:00.002"
13 PASS setValueAsNumberAndGetValue(11, 59, 59, 999) is "11:59:59.999" 13 PASS setValueAsNumberAndGetValue(11, 59, 59, 999) is "11:59:59.999"
14 PASS setValueAsNumberAndGetValue(12, 0, 0, 0) is "12:00" 14 PASS setValueAsNumberAndGetValue(12, 0, 0, 0) is "12:00"
15 PASS setValueAsNumberAndGetValue(23, 59, 59, 999) is "23:59:59.999" 15 PASS setValueAsNumberAndGetValue(23, 59, 59, 999) is "23:59:59.999"
16 PASS setValueAsNumberAndGetValue(24, 0, 0, 0) is "00:00" 16 PASS setValueAsNumberAndGetValue(24, 0, 0, 0) is "00:00"
17 PASS setValueAsNumberAndGetValue(48, 0, 13, 0) is "00:00:13" 17 PASS setValueAsNumberAndGetValue(48, 0, 13, 0) is "00:00:13"
18 PASS setValueAsNumberAndGetValue(-23, -59, -59, 0) is "00:00:01" 18 PASS setValueAsNumberAndGetValue(-23, -59, -59, 0) is "00:00:01"
19 Tests to set invalid values to valueAsNumber: 19 Tests to set invalid values to valueAsNumber:
20 PASS input.value = ""; input.valueAsNumber = null; input.value is "00:00" 20 PASS input.value = ""; input.valueAsNumber = null; input.value is "00:00"
21 PASS input.valueAsNumber = "foo" threw exception NotSupportedError: Failed to se t the 'valueAsNumber' property on 'HTMLInputElement': The value provided is not a number.. 21 PASS input.valueAsNumber = "foo"; input.valueAsNumber is NaN
22 PASS input.valueAsNumber = NaN threw exception NotSupportedError: Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The value provided is not a number.. 22 PASS input.valueAsNumber = "foo"; input.value is ""
23 PASS input.valueAsNumber = Number.NaN threw exception NotSupportedError: Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The value provided is not a number.. 23 PASS input.valueAsNumber = NaN; input.valueAsNumber is NaN
24 PASS input.valueAsNumber = Infinity threw exception NotSupportedError: Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The value provided is i nfinite.. 24 PASS input.valueAsNumber = NaN; input.value is ""
25 PASS input.valueAsNumber = Number.POSITIVE_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.valueAsNumber is NaN
26 PASS input.valueAsNumber = Number.NEGATIVE_INFINITY threw exception NotSupported Error: Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The val ue provided is infinite.. 26 PASS input.valueAsNumber = Number.NaN; input.value is ""
27 PASS input.valueAsNumber = Infinity threw exception TypeError: Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The value provided is infinite. .
28 PASS input.valueAsNumber = Number.POSITIVE_INFINITY threw exception TypeError: F ailed to set the 'valueAsNumber' property on 'HTMLInputElement': The value provi ded is infinite..
29 PASS input.valueAsNumber = Number.NEGATIVE_INFINITY threw exception TypeError: F ailed to set the 'valueAsNumber' property on 'HTMLInputElement': The value provi ded is infinite..
27 Step attribute value and string representation: 30 Step attribute value and string representation:
28 PASS input.step = "1"; setValueAsNumberAndGetValue(0, 0, 0, 0) is "00:00:00" 31 PASS input.step = "1"; setValueAsNumberAndGetValue(0, 0, 0, 0) is "00:00:00"
29 PASS input.step = "0.001"; setValueAsNumberAndGetValue(0, 0, 0, 0) is "00:00:00. 000" 32 PASS input.step = "0.001"; setValueAsNumberAndGetValue(0, 0, 0, 0) is "00:00:00. 000"
30 PASS successfullyParsed is true 33 PASS successfullyParsed is true
31 34
32 TEST COMPLETE 35 TEST COMPLETE
33 36
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698