OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../../../resources/testharness.js"></script> | 2 <script src="../../../../resources/testharness.js"></script> |
3 <script src="../../../../resources/testharnessreport.js"></script> | 3 <script src="../../../../resources/testharnessreport.js"></script> |
4 <input type="text" value="value" id="textfield"></input> | 4 <input type="text" value="value" id="textfield"></input> |
5 <script> | 5 <script> |
6 async_test(function(t) { | 6 async_test(function(t) { |
7 window.onload = t.step_func(function() { | 7 window.onload = t.step_func(function() { |
8 if (!window.eventSender) { | 8 if (!window.eventSender) { |
9 t.done(); | 9 t.done(); |
10 return; | 10 return; |
(...skipping 24 matching lines...) Expand all Loading... |
35 } | 35 } |
36 textfield.setSelectionRange(0, 0); | 36 textfield.setSelectionRange(0, 0); |
37 textfield.removeEventListener(eventType, setSelectionRange); | 37 textfield.removeEventListener(eventType, setSelectionRange); |
38 } | 38 } |
39 | 39 |
40 function setSelectionRange(e) { | 40 function setSelectionRange(e) { |
41 var textfield = document.getElementById('textfield'); | 41 var textfield = document.getElementById('textfield'); |
42 textfield.setSelectionRange(0, textfield.value.length); | 42 textfield.setSelectionRange(0, textfield.value.length); |
43 } | 43 } |
44 }, "This tests the selection of the text field after setSelectionRange is called
during a tap."); | 44 }, "This tests the selection of the text field after setSelectionRange is called
during a tap."); |
45 </script> | 45 </script> |
OLD | NEW |