OLD | NEW |
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 <p id="description"></p> | 7 <p id="description"></p> |
8 <div id="tests"><input type="button"><input type="checkbox"><input type="file"><
input type="hidden"> | 8 <div id="tests"><input type="button"><input type="checkbox"><input type="file"><
input type="hidden"> |
9 <input type="image"><input type="radio"><input type="range"><input type="reset">
<input type="submit"><input type="email"><input type="number"></div> | 9 <input type="image"><input type="radio"><input type="range"><input type="reset">
<input type="submit"><input type="email"><input type="number"> |
| 10 <input type="date"><input type="time"><input type="month"><input type="week"><in
put type="datetime-local"><input type="color"></div> |
10 <div id="console"></div> | 11 <div id="console"></div> |
11 <div> | 12 <div> |
12 <script type="text/javascript"> | 13 <script type="text/javascript"> |
13 description('Tests to ensure selectionStart, selectionEnd, selectionDirection an
d selectionRange throw exceptions when the input element is not a text field.'); | 14 description('Tests to ensure selectionStart, selectionEnd, selectionDirection an
d selectionRange throw exceptions when the input element is not a text field.'); |
14 | 15 |
15 var tests = document.getElementById('tests'); | 16 var tests = document.getElementById('tests'); |
16 for (var i = 0; i < tests.children.length; i++) { | 17 for (var i = 0; i < tests.children.length; i++) { |
17 var test = tests.children[i]; | 18 var test = tests.children[i]; |
18 test.focus(); | 19 test.focus(); |
19 | 20 |
20 shouldThrow('test.selectionStart'); | 21 shouldThrow('test.selectionStart'); |
21 shouldThrow('test.selectionStart = 0'); | 22 shouldThrow('test.selectionStart = 0'); |
22 shouldThrow('test.selectionEnd'); | 23 shouldThrow('test.selectionEnd'); |
23 shouldThrow('test.selectionEnd = 0'); | 24 shouldThrow('test.selectionEnd = 0'); |
24 shouldThrow('test.selectionDirection'); | 25 shouldThrow('test.selectionDirection'); |
25 shouldThrow('test.selectionDirection = 0'); | 26 shouldThrow('test.selectionDirection = 0'); |
26 shouldThrow('test.selectionRange()'); | 27 shouldThrow('test.selectionRange()'); |
27 } | 28 } |
28 | 29 |
29 tests.style.display = 'none'; | 30 tests.style.display = 'none'; |
30 | 31 |
31 </script> | 32 </script> |
32 </body> | 33 </body> |
33 </html> | 34 </html> |
34 | 35 |
OLD | NEW |