Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(646)

Side by Side Diff: LayoutTests/fast/events/touch/gesture/gesture-tap-input-after-composition.html

Issue 1049233003: Keep the selection of the text field when changed by JS. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/events/touch/gesture/gesture-tap-reset-selection-range.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../../../resources/testharness.js"></script>
3 <script src="../../../../resources/testharnessreport.js"></script>
4 <input id="input1" type="input">
5 <input id="input2" type="input">
6 <script>
7 test(function(t)
8 {
9 var sucessInput = false;
10 if (!window.eventSender)
11 return;
12 var input = document.getElementById('input1');
13 input.focus();
14
15 textInputController.setMarkedText('abcde', 1, 3);
16 assert_true(textInputController.hasMarkedText());
17 assert_equals(textInputController.markedRange().toString(), "0,5");
18
19 var input2 = document.getElementById('input2');
20 input2.addEventListener('input', function () {
21 sucessInput = true;
22 });
23 var x = input2.offsetLeft + input2.offsetWidth / 2;
24 var y = input2.offsetTop + input2.offsetHeight / 2;
25 eventSender.gestureTapDown(x, y);
26 eventSender.gestureShowPress(x, y);
27 eventSender.gestureTap(x, y);
28
29 eventSender.keyDown('a');
30 assert_true(sucessInput);
31 }, "This tests if the composition is reset before tapping of gesture.");
32 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/touch/gesture/gesture-tap-reset-selection-range.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698