| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../../fast/js/resources/js-test-pre.js"></script> | 4 <script src="../../../fast/js/resources/js-test-pre.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <script> | 7 <script> |
| 8 description('Check stepUp() and stepDown() bahevior for number type.'); | 8 description('Check stepUp() and stepDown() bahevior for number type.'); |
| 9 | 9 |
| 10 var input = document.createElement('input'); | 10 var input = document.createElement('input'); |
| 11 var invalidStateErr = '"Error: InvalidStateError: DOM Exception 11"'; | 11 var invalidStateErr = '"InvalidStateError: An attempt was made to use an object
that is not, or is no longer, usable."'; |
| 12 | 12 |
| 13 function setInputAttributes(min, max, step, value) { | 13 function setInputAttributes(min, max, step, value) { |
| 14 input.min = min; | 14 input.min = min; |
| 15 input.max = max; | 15 input.max = max; |
| 16 input.step = step; | 16 input.step = step; |
| 17 input.value = value; | 17 input.value = value; |
| 18 } | 18 } |
| 19 | 19 |
| 20 function stepUp(value, step, max, optionalStepCount) { | 20 function stepUp(value, step, max, optionalStepCount) { |
| 21 setInputAttributes(null, max, step, value); | 21 setInputAttributes(null, max, step, value); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 shouldBe('stepUp("5.005", "0.005", "", 2)', '"5.015"'); | 115 shouldBe('stepUp("5.005", "0.005", "", 2)', '"5.015"'); |
| 116 shouldBe('stepUp("5.005", "0.005", "", 11)', '"5.06"'); | 116 shouldBe('stepUp("5.005", "0.005", "", 11)', '"5.06"'); |
| 117 shouldBe('stepUp("5.005", "0.005", "", 12)', '"5.065"'); | 117 shouldBe('stepUp("5.005", "0.005", "", 12)', '"5.065"'); |
| 118 shouldBe('stepUpExplicitBounds("4", "9", "0.005", "5.005", 2)', '"5.015"'); | 118 shouldBe('stepUpExplicitBounds("4", "9", "0.005", "5.005", 2)', '"5.015"'); |
| 119 shouldBe('stepUpExplicitBounds("4", "9", "0.005", "5.005", 11)', '"5.06"'); | 119 shouldBe('stepUpExplicitBounds("4", "9", "0.005", "5.005", 11)', '"5.06"'); |
| 120 shouldBe('stepUpExplicitBounds("4", "9", "0.005", "5.005", 12)', '"5.065"'); | 120 shouldBe('stepUpExplicitBounds("4", "9", "0.005", "5.005", 12)', '"5.065"'); |
| 121 </script> | 121 </script> |
| 122 <script src="../../../fast/js/resources/js-test-post.js"></script> | 122 <script src="../../../fast/js/resources/js-test-post.js"></script> |
| 123 </body> | 123 </body> |
| 124 </html> | 124 </html> |
| OLD | NEW |