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

Side by Side Diff: LayoutTests/fast/events/touch/gesture/gesture-tap-reset-selection-range.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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../../../resources/js-test.js"></script>
3 <div id="dragme">Make Selection Here</div>
4 <script>
5 description("This tests if the selection is reset after tapping of gesture");
6
7 if (window.eventSender) {
8 var dragme = document.getElementById('dragme');
9 window.getSelection().selectAllChildren(dragme);
10 shouldBeGreaterThan('window.getSelection().rangeCount', '0');
yosin_UTC9 2015/07/06 01:57:29 We don't need to check this. Other test checks whe
Miyoung Shin(g) 2015/07/13 03:32:57 Done.
11
12 var x = dragme.offsetLeft + dragme.offsetWidth / 2;
13 var y = dragme.offsetTop + dragme.offsetHeight / 2;
14 eventSender.gestureTapDown(x, y);
15 eventSender.gestureShowPress(x, y);
16 eventSender.gestureTap(x, y);
17 shouldBeZero('window.getSelection().rangeCount');
18 }
19 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698