OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../../resources/js-test.js"></script> |
| 3 <input id="input1" type="input"> |
| 4 <input id="input2" type="input"> |
| 5 <script> |
| 6 description("This tests if the composition is reset before tapping of gesture"); |
| 7 |
| 8 var sucessInput = false; |
| 9 if (window.eventSender) { |
| 10 var input = document.getElementById('input1'); |
| 11 var context = input.inputMethodContext; |
| 12 input.focus(); |
| 13 |
| 14 textInputController.setMarkedText('abcde', 1, 3); |
| 15 shouldEvaluateTo('context.compositionStartOffset', 0); |
| 16 shouldEvaluateTo('context.compositionEndOffset', 5); |
| 17 |
| 18 var input2 = document.getElementById('input2'); |
| 19 input2.addEventListener('input', function () { |
| 20 sucessInput = true; |
| 21 }); |
| 22 var x = input2.offsetLeft + input2.offsetWidth / 2; |
| 23 var y = input2.offsetTop + input2.offsetHeight / 2; |
| 24 eventSender.gestureTapDown(x, y); |
| 25 eventSender.gestureShowPress(x, y); |
| 26 eventSender.gestureTap(x, y); |
| 27 |
| 28 eventSender.keyDown('a'); |
| 29 shouldBeTrue('sucessInput'); |
| 30 } |
| 31 </script> |
OLD | NEW |