| 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 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'); |
| 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 sendKey(keyName) { | 13 function sendKey(keyName) { |
| 14 var event = document.createEvent('KeyboardEvent'); | 14 var event = document.createEvent('KeyboardEvent'); |
| 15 event.initKeyboardEvent('keydown', true, true, document.defaultView, keyName
); | 15 event.initKeyboardEvent('keydown', true, true, document.defaultView, keyName
); |
| 16 input.dispatchEvent(event); | 16 input.dispatchEvent(event); |
| 17 } | 17 } |
| 18 | 18 |
| 19 function setInputAttributes(min, max, step, value) { | 19 function setInputAttributes(min, max, step, value) { |
| 20 input.min = min; | 20 input.min = min; |
| 21 input.max = max; | 21 input.max = max; |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 <script src="../../../fast/js/resources/js-test-post.js"></script> | 171 <script src="../../../fast/js/resources/js-test-post.js"></script> |
| 172 </body> | 172 </body> |
| 173 </html> | 173 </html> |
| OLD | NEW |