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="../../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <script> | 7 <script> |
8 description('Tests for .valueAsNumber with <input type=number>.'); | 8 description('Tests for .valueAsNumber with <input type=number>.'); |
9 | 9 |
10 var input = document.createElement('input'); | 10 var input = document.createElement('input'); |
11 input.type = 'number'; | 11 input.type = 'number'; |
12 | 12 |
13 function valueAsNumberFor(stringValue) { | 13 function valueAsNumberFor(stringValue) { |
14 input.value = stringValue; | 14 input.value = stringValue; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 shouldBe('setValueAsNumberAndGetValue(null)', '"0"'); | 70 shouldBe('setValueAsNumberAndGetValue(null)', '"0"'); |
71 shouldThrow('setValueAsNumberAndGetValue("foo")', '"NotSupportedError: The imple
mentation did not support the requested type of object or operation."'); | 71 shouldThrow('setValueAsNumberAndGetValue("foo")', '"NotSupportedError: The imple
mentation did not support the requested type of object or operation."'); |
72 shouldThrow('setValueAsNumberAndGetValue(NaN)', '"NotSupportedError: The impleme
ntation did not support the requested type of object or operation."'); | 72 shouldThrow('setValueAsNumberAndGetValue(NaN)', '"NotSupportedError: The impleme
ntation did not support the requested type of object or operation."'); |
73 shouldThrow('setValueAsNumberAndGetValue(Number.NaN)', '"NotSupportedError: The
implementation did not support the requested type of object or operation."'); | 73 shouldThrow('setValueAsNumberAndGetValue(Number.NaN)', '"NotSupportedError: The
implementation did not support the requested type of object or operation."'); |
74 shouldThrow('setValueAsNumberAndGetValue(Infinity)', '"NotSupportedError: The im
plementation did not support the requested type of object or operation."'); | 74 shouldThrow('setValueAsNumberAndGetValue(Infinity)', '"NotSupportedError: The im
plementation did not support the requested type of object or operation."'); |
75 shouldThrow('setValueAsNumberAndGetValue(Number.POSITIVE_INFINITY)', '"NotSuppor
tedError: The implementation did not support the requested type of object or ope
ration."'); | 75 shouldThrow('setValueAsNumberAndGetValue(Number.POSITIVE_INFINITY)', '"NotSuppor
tedError: The implementation did not support the requested type of object or ope
ration."'); |
76 shouldThrow('setValueAsNumberAndGetValue(Number.NEGATIVE_INFINITY)', '"NotSuppor
tedError: The implementation did not support the requested type of object or ope
ration."'); | 76 shouldThrow('setValueAsNumberAndGetValue(Number.NEGATIVE_INFINITY)', '"NotSuppor
tedError: The implementation did not support the requested type of object or ope
ration."'); |
77 </script> | 77 </script> |
78 </body> | 78 </body> |
79 </html> | 79 </html> |
OLD | NEW |