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

Side by Side Diff: LayoutTests/fast/forms/number/number-stepup-stepdown-from-renderer.html

Issue 172223003: Input type Number maximum value increase (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reverted back StepRange changes Created 6 years, 9 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <script> 7 <script>
8 description('Check stepping-up and -down for number input from renderer.'); 8 description('Check stepping-up and -down for number input from renderer.');
9 9
10 var input = document.createElement('input'); 10 var input = document.createElement('input');
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 debug('Step=any'); 114 debug('Step=any');
115 shouldBe('stepUp("0", "any", null)', '"1"'); 115 shouldBe('stepUp("0", "any", null)', '"1"');
116 shouldBe('stepDown("0", "any", null)', '"-1"'); 116 shouldBe('stepDown("0", "any", null)', '"-1"');
117 debug('Step=any corner case'); 117 debug('Step=any corner case');
118 shouldBe('stepUpExplicitBounds("0", "100", "any", "1.5", "1")', '"2.5"'); 118 shouldBe('stepUpExplicitBounds("0", "100", "any", "1.5", "1")', '"2.5"');
119 shouldBe('stepDownExplicitBounds("0", "100", "any", "1.5", "1")', '"0.5"'); 119 shouldBe('stepDownExplicitBounds("0", "100", "any", "1.5", "1")', '"0.5"');
120 debug('Overflow/underflow'); 120 debug('Overflow/underflow');
121 shouldBe('stepDown("1", "1", "0")', '"0"'); 121 shouldBe('stepDown("1", "1", "0")', '"0"');
122 shouldBe('stepDown("0", "1", "0")', '"0"'); 122 shouldBe('stepDown("0", "1", "0")', '"0"');
123 shouldBe('stepDown("1", "1", "0", 2)', '"0"'); 123 shouldBe('stepDown("1", "1", "0", 2)', '"0"');
124 shouldBe('stepDown("1", "3.40282346e+38", "", 2)', '"-3.40282346e+38"'); 124 shouldBe('stepDown("1", "1.797693134862315e+308", "", 2)', '"-1.797693134862315e +308"');
125 shouldBe('stepUp("-1", "1", "0")', '"0"'); 125 shouldBe('stepUp("-1", "1", "0")', '"0"');
126 shouldBe('stepUp("0", "1", "0")', '"0"'); 126 shouldBe('stepUp("0", "1", "0")', '"0"');
127 shouldBe('stepUp("-1", "1", "0", 2)', '"0"'); 127 shouldBe('stepUp("-1", "1", "0", 2)', '"0"');
128 shouldBe('stepUp("1", "3.40282346e+38", "", 2)', '"3.40282346e+38"'); 128 shouldBe('stepUp("1", "1.797693134862315e+308", "", 2)', '"1.797693134862315e+30 8"');
129 debug('stepDown()/stepUp() for stepMismatch values'); 129 debug('stepDown()/stepUp() for stepMismatch values');
130 shouldBe('stepUp("1", "2", "")', '"2"'); 130 shouldBe('stepUp("1", "2", "")', '"2"');
131 shouldBe('input.min = "0"; stepUp("9", "10", "")', '"10"'); 131 shouldBe('input.min = "0"; stepUp("9", "10", "")', '"10"');
132 shouldBe('stepDown("19", "10", "0")', '"10"'); 132 shouldBe('stepDown("19", "10", "0")', '"10"');
133 shouldBe('stepUp("89", "10", "99")', '"90"'); 133 shouldBe('stepUp("89", "10", "99")', '"90"');
134 shouldBe('stepUp("7", "300", "")', '"300"'); 134 shouldBe('stepUp("7", "300", "")', '"300"');
135 shouldBe('stepUp("-7", "300", "")', '"0"'); 135 shouldBe('stepUp("-7", "300", "")', '"0"');
136 shouldBe('stepDown("7", "300", "")', '"0"'); 136 shouldBe('stepDown("7", "300", "")', '"0"');
137 shouldBe('stepDown("-7", "300", "")', '"-300"'); 137 shouldBe('stepDown("-7", "300", "")', '"-300"');
138 debug('Huge value and small step'); 138 debug('Huge value and small step');
139 shouldBe('input.min = ""; stepUp("1e+38", "1", "", 999)', '"1e+38"'); 139 shouldBe('input.min = ""; stepUp("1e+308", "1", "", 999)', '"1e+308"');
140 shouldBe('input.max = ""; stepDown("1e+38", "1", "", 999)', '"1e+38"'); 140 shouldBe('input.max = ""; stepDown("1e+308", "1", "", 999)', '"1e+308"');
141 debug('Fractional numbers'); 141 debug('Fractional numbers');
142 shouldBe('input.min = ""; stepUp("0", "0.33333333333333333", "", 3)', '"1"'); 142 shouldBe('input.min = ""; stepUp("0", "0.33333333333333333", "", 3)', '"1"');
143 shouldBe('stepUp("1", "0.1", "", 10)', '"2"'); 143 shouldBe('stepUp("1", "0.1", "", 10)', '"2"');
144 shouldBe('input.min = "0"; stepUp("0", "0.003921568627450980", "1", 255)', '"1"' ); 144 shouldBe('input.min = "0"; stepUp("0", "0.003921568627450980", "1", 255)', '"1"' );
145 debug('Rounding'); 145 debug('Rounding');
146 shouldBe('stepUp("5.005", "0.005", "", 2)', '"5.015"'); 146 shouldBe('stepUp("5.005", "0.005", "", 2)', '"5.015"');
147 shouldBe('stepUp("5.005", "0.005", "", 11)', '"5.06"'); 147 shouldBe('stepUp("5.005", "0.005", "", 11)', '"5.06"');
148 shouldBe('stepUp("5.005", "0.005", "", 12)', '"5.065"'); 148 shouldBe('stepUp("5.005", "0.005", "", 12)', '"5.065"');
149 shouldBe('stepUpExplicitBounds("4", "9", "0.005", "5.005", 2)', '"5.015"'); 149 shouldBe('stepUpExplicitBounds("4", "9", "0.005", "5.005", 2)', '"5.015"');
150 shouldBe('stepUpExplicitBounds("4", "9", "0.005", "5.005", 11)', '"5.06"'); 150 shouldBe('stepUpExplicitBounds("4", "9", "0.005", "5.005", 11)', '"5.06"');
(...skipping 12 matching lines...) Expand all
163 shouldBe('stepDownExplicitBounds(1, 4, 1, 0)', '"0"'); 163 shouldBe('stepDownExplicitBounds(1, 4, 1, 0)', '"0"');
164 shouldBe('stepDownExplicitBounds(-4, -1, 1, 0)', '"-1"'); 164 shouldBe('stepDownExplicitBounds(-4, -1, 1, 0)', '"-1"');
165 shouldBe('stepUpExplicitBounds(-4, -1, 1, 0)', '"0"'); 165 shouldBe('stepUpExplicitBounds(-4, -1, 1, 0)', '"0"');
166 shouldBe('stepUpExplicitBounds(-100, null, 3, 3)', '"5"'); 166 shouldBe('stepUpExplicitBounds(-100, null, 3, 3)', '"5"');
167 shouldBe('stepDownExplicitBounds(-100, null, 3, 3)', '"2"'); 167 shouldBe('stepDownExplicitBounds(-100, null, 3, 3)', '"2"');
168 168
169 debug(''); 169 debug('');
170 </script> 170 </script>
171 </body> 171 </body>
172 </html> 172 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698