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

Side by Side Diff: LayoutTests/fast/events/touch/gesture/gesture-tap-reset-selection-range.html

Issue 705733002: Make sure that selection is cleared after tapping. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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-expected.txt » ('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/js-test.js"></script>
3 <body>
Rick Byers 2014/11/13 20:09:01 nit: omit <body> (it's unnecessary and you have no
4 <div id="dragme">Make Selection Here</div>
5 <p id="description"></p>
Rick Byers 2014/11/13 20:09:01 nit: you can also omit this <p> and the blow conso
6 <div id="console"></div>
7 <script>
8 description("This tests if the selection is reset after tapping of gesture");
9
10 var dragme = document.getElementById('dragme');
11 var reselt;
Rick Byers 2014/11/13 20:09:01 note this is mis-spelled.
12 if (window.eventSender) {
13 var startX = dragme.offsetLeft;
14 var startY = dragme.offsetTop;
15
16 var endX = dragme.offsetLeft + dragme.offsetWidth;
17 var endY = dragme.offsetTop + dragme.offsetHeight;
18
19 eventSender.mouseMoveTo(startX, startY);
20 eventSender.mouseDown();
21 eventSender.leapForward(200);
22 eventSender.mouseMoveTo(endX, endY);
23 eventSender.mouseUp();
Rick Byers 2014/11/13 20:09:01 Could this test be simpler by setting the selectio
24
25 eventSender.gestureTap(startX + dragme.offsetWidth / 2, startY + dragme.offs etHeight / 2);
Rick Byers 2014/11/13 20:09:01 we're trying to start to enforce (with ASSERTs) th
26
27 result = window.getSelection().rangeCount > 0 ? 'FAILED' : 'SUCCESS';
Rick Byers 2014/11/13 20:09:01 no need for the temporary 'result'. Just do a sho
28 shouldBeEqualToString('result', 'SUCCESS');
29 }
30 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/touch/gesture/gesture-tap-reset-selection-range-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698