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

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

Issue 235273003: parsing input type=number should skip spaces (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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=number>. 1 Tests for .valueAsNumber with <input type=number>.
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("0") is 0 6 PASS valueAsNumberFor("0") is 0
7 PASS valueAsNumberFor("0.2") is 0.2 7 PASS valueAsNumberFor("0.2") is 0.2
8 PASS valueAsNumberFor(".2") is 0.2 8 PASS valueAsNumberFor(".2") is 0.2
9 PASS valueAsNumberFor("10") is 10 9 PASS valueAsNumberFor("10") is 10
10 PASS valueAsNumberFor(" 10") is 10
11 PASS valueAsNumberFor("10 ") is 10
12 PASS valueAsNumberFor("1 0") is 10
10 PASS valueAsNumberFor("01") is 1 13 PASS valueAsNumberFor("01") is 1
11 PASS valueAsNumberFor("-0") is 0 14 PASS valueAsNumberFor("-0") is 0
12 PASS valueAsNumberFor("-1.2") is -1.2 15 PASS valueAsNumberFor("-1.2") is -1.2
13 PASS valueAsNumberFor("1.2E10") is 1.2E10 16 PASS valueAsNumberFor("1.2E10") is 1.2E10
14 PASS valueAsNumberFor("1.2E-10") is 1.2E-10 17 PASS valueAsNumberFor("1.2E-10") is 1.2E-10
15 PASS valueAsNumberFor("1.2E+10") is 1.2E10 18 PASS valueAsNumberFor("1.2E+10") is 1.2E10
16 PASS valueAsNumberFor("123456789012345678901234567890123456789012345678901234567 89012345678901234567890123456789012345678901234567890123456789012345678901234567 89012345678901234567890123456789012345678901234567890123456789012345678901234567 89012345678901234567890123456789012345678901234567890123456789012345678901234567 890123456789") is 1.2345678901234568E+308 19 PASS valueAsNumberFor("123456789012345678901234567890123456789012345678901234567 89012345678901234567890123456789012345678901234567890123456789012345678901234567 89012345678901234567890123456789012345678901234567890123456789012345678901234567 89012345678901234567890123456789012345678901234567890123456789012345678901234567 890123456789") is 1.2345678901234568E+308
17 PASS valueAsNumberFor("0.12345678901234567890123456789012345678901234567890") is 0.123456789012345678 20 PASS valueAsNumberFor("0.12345678901234567890123456789012345678901234567890") is 0.123456789012345678
18 valueAsNumber for invalid string values: 21 valueAsNumber for invalid string values:
19 PASS isNaN(valueAsNumberFor("")) is true 22 PASS isNaN(valueAsNumberFor("")) is true
20 PASS isNaN(valueAsNumberFor("abc")) is true 23 PASS isNaN(valueAsNumberFor("abc")) is true
21 PASS isNaN(valueAsNumberFor("0xff")) is true 24 PASS isNaN(valueAsNumberFor("0xff")) is true
22 PASS isNaN(valueAsNumberFor("+1")) is true 25 PASS isNaN(valueAsNumberFor("+1")) is true
23 PASS isNaN(valueAsNumberFor(" 10")) is true
24 PASS isNaN(valueAsNumberFor("10 ")) is true
25 PASS isNaN(valueAsNumberFor(".")) is true 26 PASS isNaN(valueAsNumberFor(".")) is true
26 PASS isNaN(valueAsNumberFor("1E")) is true 27 PASS isNaN(valueAsNumberFor("1E")) is true
27 PASS isNaN(valueAsNumberFor("NaN")) is true 28 PASS isNaN(valueAsNumberFor("NaN")) is true
28 PASS isNaN(valueAsNumberFor("nan")) is true 29 PASS isNaN(valueAsNumberFor("nan")) is true
29 PASS isNaN(valueAsNumberFor("Inf")) is true 30 PASS isNaN(valueAsNumberFor("Inf")) is true
30 PASS isNaN(valueAsNumberFor("inf")) is true 31 PASS isNaN(valueAsNumberFor("inf")) is true
31 PASS isNaN(valueAsNumberFor("Infinity")) is true 32 PASS isNaN(valueAsNumberFor("Infinity")) is true
32 PASS isNaN(valueAsNumberFor("infinity")) is true 33 PASS isNaN(valueAsNumberFor("infinity")) is true
33 Too huge exponent to support 34 Too huge exponent to support
34 PASS isNaN(valueAsNumberFor("1.2E65535")) is true 35 PASS isNaN(valueAsNumberFor("1.2E65535")) is true
(...skipping 15 matching lines...) Expand all
50 PASS setValueAsNumberAndGetValue("foo") is "" 51 PASS setValueAsNumberAndGetValue("foo") is ""
51 PASS setValueAsNumberAndGetValue(NaN) is "" 52 PASS setValueAsNumberAndGetValue(NaN) is ""
52 PASS setValueAsNumberAndGetValue(Number.NaN) is "" 53 PASS setValueAsNumberAndGetValue(Number.NaN) is ""
53 PASS setValueAsNumberAndGetValue(Infinity) threw exception TypeError: Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The value provided is in finite.. 54 PASS setValueAsNumberAndGetValue(Infinity) threw exception TypeError: Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The value provided is in finite..
54 PASS setValueAsNumberAndGetValue(Number.POSITIVE_INFINITY) threw exception TypeE rror: Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The valu e provided is infinite.. 55 PASS setValueAsNumberAndGetValue(Number.POSITIVE_INFINITY) threw exception TypeE rror: Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The valu e provided is infinite..
55 PASS setValueAsNumberAndGetValue(Number.NEGATIVE_INFINITY) threw exception TypeE rror: Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The valu e provided is infinite.. 56 PASS setValueAsNumberAndGetValue(Number.NEGATIVE_INFINITY) threw exception TypeE rror: Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The valu e provided is infinite..
56 PASS successfullyParsed is true 57 PASS successfullyParsed is true
57 58
58 TEST COMPLETE 59 TEST COMPLETE
59 60
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698